diff --git a/drake_bazel_external/.bazelrc b/drake_bazel_external/.bazelrc index 04c4875a..29d084cb 100644 --- a/drake_bazel_external/.bazelrc +++ b/drake_bazel_external/.bazelrc @@ -1,13 +1,9 @@ # SPDX-License-Identifier: MIT-0 -# Disable native Python rules in Bazel versions before 3.0. -build --incompatible_load_python_rules_from_bzl=yes - # Default to an optimized build. build --compilation_mode=opt # Default build options. -build --force_pic=yes build --strip=never # Default test options. @@ -21,6 +17,11 @@ build --host_cxxopt=-std=c++17 # https://github.com/bazelbuild/bazel/issues/1164 build --action_env=CCACHE_DISABLE=1 +# For Ubuntu builds, this flag can cut build times in half. For macOS builds, +# this flag might cause build errors. We suggest turning it on if and only if +# your project doesn't use macOS. +## build --force_pic=yes + # TODO(jwnimmer-tri) We should see if we can reuse more of Drake's # customizations somehow. diff --git a/drake_bazel_installed/.bazelrc b/drake_bazel_installed/.bazelrc index 2bbbbe5e..29d084cb 100644 --- a/drake_bazel_installed/.bazelrc +++ b/drake_bazel_installed/.bazelrc @@ -1,14 +1,9 @@ # SPDX-License-Identifier: MIT-0 -# Disable native Python rules in Bazel versions before 3.0. -# TODO(jamiesnape): Uncomment the below line when @drake uses @rules_python. -# build --incompatible_load_python_rules_from_bzl=yes - # Default to an optimized build. build --compilation_mode=opt # Default build options. -build --force_pic=yes build --strip=never # Default test options. @@ -22,6 +17,11 @@ build --host_cxxopt=-std=c++17 # https://github.com/bazelbuild/bazel/issues/1164 build --action_env=CCACHE_DISABLE=1 +# For Ubuntu builds, this flag can cut build times in half. For macOS builds, +# this flag might cause build errors. We suggest turning it on if and only if +# your project doesn't use macOS. +## build --force_pic=yes + # TODO(jwnimmer-tri) We should see if we can reuse more of Drake's # customizations somehow. diff --git a/scripts/continuous_integration/common/drake_bazel_external b/scripts/continuous_integration/common/drake_bazel_external index d8cd2f8c..9efbfe5c 100755 --- a/scripts/continuous_integration/common/drake_bazel_external +++ b/scripts/continuous_integration/common/drake_bazel_external @@ -3,10 +3,9 @@ set -euxo pipefail -bazel version - pushd drake_bazel_external +bazel version bazel test //... popd diff --git a/scripts/continuous_integration/common/drake_bazel_installed b/scripts/continuous_integration/common/drake_bazel_installed index 3167dc10..ba6104e5 100755 --- a/scripts/continuous_integration/common/drake_bazel_installed +++ b/scripts/continuous_integration/common/drake_bazel_installed @@ -3,10 +3,9 @@ set -euxo pipefail -bazel version - pushd drake_bazel_installed +bazel version bazel test //... popd