Leopold | eb2fb7b | 2022-06-08 13:18:51 +0200 | [diff] [blame] | 1 | # Enable strict_action_env (use static PATH and do not inherit environment variables). |
| 2 | # This avoids unnecessary cache invalidations. |
| 3 | build --incompatible_strict_action_env=true |
| 4 | |
Leopold | 7fbf104 | 2023-01-06 19:57:37 +0100 | [diff] [blame] | 5 | # TODO: Enable hermetic sandbox on Bazel 5.x |
| 6 | # build --experimental_use_hermetic_linux_sandbox |
| 7 | |
| 8 | build --action_env=MONOGON_SANDBOX_DIGEST |
| 9 | import %workspace%/.bazelrc.sandbox |
| 10 | |
Leopold | eb2fb7b | 2022-06-08 13:18:51 +0200 | [diff] [blame] | 11 | # Build resources |
Leopold Schabel | 5c80aca | 2019-10-22 15:48:58 +0200 | [diff] [blame] | 12 | startup --batch_cpu_scheduling --io_nice_level 7 |
Leopold | afb925b | 2023-01-08 16:57:28 +0100 | [diff] [blame] | 13 | test --test_output=errors |
Lorenz Brun | 5d7d2a4 | 2020-04-06 14:11:02 +0200 | [diff] [blame] | 14 | |
Leopold | 96b03c7 | 2022-06-08 12:59:58 +0200 | [diff] [blame] | 15 | # selinux: |
| 16 | # build with SELinux (containerd, kubelet) |
| 17 | # no_zfs,no_aufs,no_devicemapper: |
| 18 | # disable containerd features we don't need |
| 19 | # providerless,dockerless: |
| 20 | # build k8s without cloud provider and docker support |
Serge Bazanski | 46e72ab | 2022-09-05 15:13:22 +0200 | [diff] [blame] | 21 | # nowasm: |
| 22 | # disable wasm plugin support in sqlc |
| 23 | build --define gotags=selinux,seccomp,no_zfs,no_aufs,no_devicemapper,providerless,dockerless,nowasm |
Serge Bazanski | bb7db92 | 2020-04-30 12:43:10 +0200 | [diff] [blame] | 24 | |
| 25 | # Build with C++17. |
| 26 | build --cxxopt=-std=c++17 |
| 27 | |
Lorenz Brun | f640211 | 2020-05-04 16:50:31 +0200 | [diff] [blame] | 28 | # Set workspace status file and stamp |
| 29 | build --stamp --workspace_status_command=./build/print-workspace-status.sh |
Serge Bazanski | 385c12f | 2020-06-17 12:12:42 +0200 | [diff] [blame] | 30 | |
| 31 | # Use our custom-configured host C++ toolchain. |
| 32 | build --crosstool_top=//build/toolchain:host_cc_suite |
Leopold | 7fbf104 | 2023-01-06 19:57:37 +0100 | [diff] [blame] | 33 | build --host_crosstool_top=//build/toolchain:host_cc_suite |
Serge Bazanski | 385c12f | 2020-06-17 12:12:42 +0200 | [diff] [blame] | 34 | build --cpu=k8 |
| 35 | |
Serge Bazanski | c3ad846 | 2021-01-08 16:45:51 +0100 | [diff] [blame] | 36 | # Load CI bazelrc if present. |
| 37 | try-import %workspace%/ci.bazelrc |
Leopold | 3154587 | 2022-06-08 13:22:32 +0200 | [diff] [blame] | 38 | |
| 39 | # Load custom per-user settings. |
| 40 | try-import %workspace%/.bazelrc.user |