|
| 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 | +# https://bazel.build/reference/command-line-reference#flag--enable_platform_specific_config |
| 9 | +common --enable_platform_specific_config |
| 10 | + |
| 11 | +# Enable the only currently supported report type |
| 12 | +# https://bazel.build/reference/command-line-reference#flag--combined_report |
| 13 | +coverage --combined_report=lcov |
| 14 | + |
| 15 | +# Avoid fully cached builds reporting no coverage and failing CI |
| 16 | +# https://bazel.build/reference/command-line-reference#flag--experimental_fetch_all_coverage_outputs |
| 17 | +coverage --experimental_fetch_all_coverage_outputs |
| 18 | + |
| 19 | +# https://github.com/bazelbuild/bazel/issues/8195 |
| 20 | +build --incompatible_disallow_empty_glob=true |
| 21 | + |
| 22 | +# https://github.com/bazelbuild/bazel/issues/12821 |
| 23 | +build --nolegacy_external_runfiles |
| 24 | + |
| 25 | +# Disable legacy __init__.py behavior which is known to conflict with |
| 26 | +# modern python versions (3.9+) |
| 27 | +build --incompatible_default_to_explicit_init_py |
| 28 | + |
| 29 | +# https://github.com/bazelbuild/bazel/issues/23043. |
| 30 | +build --incompatible_autoload_externally= |
| 31 | + |
| 32 | +############################################################################### |
| 33 | +## Configuration Flags |
| 34 | +############################################################################### |
| 35 | + |
| 36 | +# Enable black for all targets in the workspace |
| 37 | +build:verilator_lint --aspects=//verilator:verilator_lint_aspect.bzl%verilator_lint_aspect |
| 38 | +build:verilator_lint --output_groups=+verilator_lint_checks |
| 39 | + |
| 40 | +test --config=verilator_lint |
| 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