| import %workspace%/tools/preset.bazelrc | |
| common --noenable_workspace | |
| # We have some empty globs in rules_js | |
| common --noincompatible_disallow_empty_glob | |
| # Enable cc toolchain resolution to be on par with bazel8 which enables it by default | |
| build --incompatible_enable_cc_toolchain_resolution | |
| # Don't build protoc from the cc_binary, it's slow and spammy when cache miss | |
| common --per_file_copt=external/.*protobuf.*@--PROTOBUF_WAS_NOT_SUPPOSED_TO_BE_BUILT | |
| common --host_per_file_copt=external/.*protobuf.*@--PROTOBUF_WAS_NOT_SUPPOSED_TO_BE_BUILT | |
| # Mock versioning command to test the --stamp behavior | |
| build --workspace_status_command="echo BUILD_SCM_VERSION 1.2.3" | |
| # Don’t want to push a rules author to update their deps if not needed. | |
| # https://bazel.build/reference/command-line-reference#flag--check_direct_dependencies | |
| # https://bazelbuild.slack.com/archives/C014RARENH0/p1691158021917459?thread_ts=1691156601.420349&cid=C014RARENH0 | |
| common --check_direct_dependencies=off | |
| # Ignore this test as it breaks the runfiles tree generation in coverage mode. | |
| # Also see: .aspect/bazelrc/performance.bazelrc where runfiles trees are eagerly | |
| # generated due to `coverage --build_runfile_links` | |
| coverage --deleted_packages=js/private/test/image/non_ascii | |
| # js/private/test/coverage instruments the test's own entry_point; matches what CI passes. | |
| coverage --instrument_test_targets | |
| # Build without the bytes | |
| common:ci --remote_download_outputs=minimal | |
| common:ci --nobuild_runfile_links | |
| # Override the preset's `--lockfile_mode=error` on CI since we don't | |
| # yet commit MODULE.bazel.lock — see .gitignore. | |
| common:ci --lockfile_mode=off | |
| # Run everything under Bazel's hermetic Linux sandbox, which mounts only the declared | |
| # inputs of an action. Each mount below is necessary, primarily for things like shebang | |
| # lines in shell scripts and libraries for dynamically linked node binaries. | |
| build:hermetic-sandbox --strategy=linux-sandbox | |
| build:hermetic-sandbox --experimental_use_hermetic_linux_sandbox | |
| build:hermetic-sandbox --sandbox_add_mount_pair=/bin | |
| build:hermetic-sandbox --sandbox_add_mount_pair=/usr | |
| build:hermetic-sandbox --sandbox_add_mount_pair=/lib | |
| build:hermetic-sandbox --sandbox_add_mount_pair=/lib64 | |
| build:hermetic-sandbox --sandbox_add_mount_pair=/etc | |
| build:hermetic-sandbox --sandbox_add_mount_pair=/proc |