|
| 1 | +############################################################################### |
| 2 | +## Bazel Configuration Flags |
| 3 | +## |
| 4 | +## `.bazelrc` is a Bazel configuration file. |
| 5 | +## https://bazel.build/docs/best-practices#bazelrc-file |
| 6 | +############################################################################### |
| 7 | + |
| 8 | +# Skip building runfiles links for faster builds. |
| 9 | +build --nobuild_runfile_links |
| 10 | + |
| 11 | +# https://bazel.build/reference/command-line-reference#flag--enable_platform_specific_config |
| 12 | +common --enable_platform_specific_config |
| 13 | + |
| 14 | +# Enable the only currently supported report type |
| 15 | +# https://bazel.build/reference/command-line-reference#flag--combined_report |
| 16 | +coverage --combined_report=lcov |
| 17 | + |
| 18 | +# Avoid fully cached builds reporting no coverage and failing CI |
| 19 | +# https://bazel.build/reference/command-line-reference#flag--experimental_fetch_all_coverage_outputs |
| 20 | +coverage --experimental_fetch_all_coverage_outputs |
| 21 | + |
| 22 | +# Required for some of the tests |
| 23 | +# https://bazel.build/reference/command-line-reference#flag--experimental_cc_shared_library |
| 24 | +common --experimental_cc_shared_library |
| 25 | + |
| 26 | +# Disable network access in sandboxes by default. |
| 27 | +build --sandbox_default_allow_network=false |
| 28 | + |
| 29 | +############################################################################### |
| 30 | +## Incompatibility flags |
| 31 | +############################################################################### |
| 32 | + |
| 33 | +# https://github.com/bazelbuild/bazel/issues/8195 |
| 34 | +build --incompatible_disallow_empty_glob=true |
| 35 | + |
| 36 | +# https://github.com/bazelbuild/bazel/issues/12821 |
| 37 | +build --nolegacy_external_runfiles |
| 38 | + |
| 39 | +# https://github.com/bazelbuild/bazel/issues/23043. |
| 40 | +build --incompatible_autoload_externally= |
| 41 | + |
| 42 | +############################################################################### |
| 43 | +## Custom user flags |
| 44 | +## |
| 45 | +## This should always be the last thing in the `.bazelrc` file to ensure |
| 46 | +## consistent behavior when setting flags in that file as `.bazelrc` files are |
| 47 | +## evaluated top to bottom. |
| 48 | +############################################################################### |
| 49 | + |
| 50 | +try-import %workspace%/user.bazelrc |
0 commit comments