-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved bzlmod extension to better control registered toolchains
- Loading branch information
1 parent
92f81ee
commit 77a857f
Showing
27 changed files
with
2,241 additions
and
1,889 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
############################################################################### | ||
## Bazel Configuration Flags | ||
## | ||
## `.bazelrc` is a Bazel configuration file. | ||
## https://bazel.build/docs/best-practices#bazelrc-file | ||
############################################################################### | ||
|
||
# https://bazel.build/reference/command-line-reference#flag--enable_platform_specific_config | ||
common --enable_platform_specific_config | ||
|
||
# Enable the only currently supported report type | ||
# https://bazel.build/reference/command-line-reference#flag--combined_report | ||
coverage --combined_report=lcov | ||
|
||
# Avoid fully cached builds reporting no coverage and failing CI | ||
# https://bazel.build/reference/command-line-reference#flag--experimental_fetch_all_coverage_outputs | ||
coverage --experimental_fetch_all_coverage_outputs | ||
|
||
# Required for some of the tests | ||
# https://bazel.build/reference/command-line-reference#flag--experimental_cc_shared_library | ||
common --experimental_cc_shared_library | ||
|
||
############################################################################### | ||
## Incompatibility flags | ||
############################################################################### | ||
|
||
# https://github.com/bazelbuild/bazel/issues/8195 | ||
build --incompatible_disallow_empty_glob=true | ||
|
||
# https://github.com/bazelbuild/bazel/issues/12821 | ||
build --nolegacy_external_runfiles | ||
|
||
# Required for cargo_build_script support before Bazel 7 | ||
build --incompatible_merge_fixed_and_default_shell_env | ||
|
||
############################################################################### | ||
## Bzlmod | ||
############################################################################### | ||
|
||
# A configuration for disabling bzlmod. | ||
common:no-bzlmod --noenable_bzlmod --enable_workspace | ||
|
||
# Disable the bzlmod lockfile, so we don't accidentally commit MODULE.bazel.lock | ||
common --lockfile_mode=off | ||
|
||
############################################################################### | ||
## Custom user flags | ||
## | ||
## This should always be the last thing in the `.bazelrc` file to ensure | ||
## consistent behavior when setting flags in that file as `.bazelrc` files are | ||
## evaluated top to bottom. | ||
############################################################################### | ||
|
||
try-import %workspace%/user.bazelrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.