blob: fc404c2fbbec04d2735949af50959fdec0c15c44 [file] [log] [blame]
Tim Windelschmidt6c851e22024-01-11 15:23:48 +01001# Directories used by sandboxed non-worker execution may be reused to avoid unnecessary setup costs.
2# Save time on Sandbox creation and deletion when many of the same kind of action run during the
3# build.
4# No longer experimental in Bazel 6: https://github.com/bazelbuild/bazel/commit/c1a95501a5611878e5cc43a3cc531f2b9e47835b
5# Docs: https://bazel.build/reference/command-line-reference#flag--reuse_sandbox_directories
6build --experimental_reuse_sandbox_directories
7
8# Do not build runfiles symlink forests for external repositories under
9# `.runfiles/wsname/external/repo` (in addition to `.runfiles/repo`). This reduces runfiles &
10# sandbox creation times & prevents accidentally depending on this feature which may flip to off by
11# default in the future. Note, some rules may fail under this flag, please file issues with the rule
12# author.
13# Docs: https://bazel.build/reference/command-line-reference#flag--legacy_external_runfiles
14build --nolegacy_external_runfiles
Tim Windelschmidt5d0f6342024-09-25 03:35:00 +020015
16# Avoid creating a runfiles tree for binaries or tests until it is needed.
17# Docs: https://bazel.build/reference/command-line-reference#flag--build_runfile_links
18# See https://github.com/bazelbuild/bazel/issues/6627
19#
20# This may break local workflows that `build` a binary target, then run the resulting program
21# outside of `bazel run`. In those cases, the script will need to call
22# `bazel build --build_runfile_links //my/binary:target` and then execute the resulting program.
23build --nobuild_runfile_links
Tim Windelschmidteda1e122025-01-09 05:42:53 +010024
25# Needed prior to Bazel 8; see
26# https://github.com/bazelbuild/bazel/issues/20577
27coverage --build_runfile_links