| Tim Windelschmidt | 6c851e2 | 2024-01-11 15:23:48 +0100 | [diff] [blame] | 1 | # Don't apply `--noremote_upload_local_results` and `--noremote_accept_cached` to the disk cache. |
| 2 | # If you have both `--noremote_upload_local_results` and `--disk_cache`, then this fixes a bug where |
| 3 | # Bazel doesn't write to the local disk cache as it treats as a remote cache. |
| 4 | # Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_remote_results_ignore_disk |
| 5 | build --incompatible_remote_results_ignore_disk |
| 6 | |
| 7 | # Directories used by sandboxed non-worker execution may be reused to avoid unnecessary setup costs. |
| 8 | # Save time on Sandbox creation and deletion when many of the same kind of action run during the |
| 9 | # build. |
| 10 | # No longer experimental in Bazel 6: https://github.com/bazelbuild/bazel/commit/c1a95501a5611878e5cc43a3cc531f2b9e47835b |
| 11 | # Docs: https://bazel.build/reference/command-line-reference#flag--reuse_sandbox_directories |
| 12 | build --experimental_reuse_sandbox_directories |
| 13 | |
| 14 | # Do not build runfiles symlink forests for external repositories under |
| 15 | # `.runfiles/wsname/external/repo` (in addition to `.runfiles/repo`). This reduces runfiles & |
| 16 | # sandbox creation times & prevents accidentally depending on this feature which may flip to off by |
| 17 | # default in the future. Note, some rules may fail under this flag, please file issues with the rule |
| 18 | # author. |
| 19 | # Docs: https://bazel.build/reference/command-line-reference#flag--legacy_external_runfiles |
| 20 | build --nolegacy_external_runfiles |
| Tim Windelschmidt | 5d0f634 | 2024-09-25 03:35:00 +0200 | [diff] [blame] | 21 | |
| 22 | # Avoid creating a runfiles tree for binaries or tests until it is needed. |
| 23 | # Docs: https://bazel.build/reference/command-line-reference#flag--build_runfile_links |
| 24 | # See https://github.com/bazelbuild/bazel/issues/6627 |
| 25 | # |
| 26 | # This may break local workflows that `build` a binary target, then run the resulting program |
| 27 | # outside of `bazel run`. In those cases, the script will need to call |
| 28 | # `bazel build --build_runfile_links //my/binary:target` and then execute the resulting program. |
| 29 | build --nobuild_runfile_links |