2023-03-09 09:23:42 -05:00
|
|
|
# share bazel cache between checkouts of the same project
|
|
|
|
# and keep old build caches around for longer
|
|
|
|
build --disk_cache=~/.cache/shared_bazel_action_cache
|
|
|
|
build --repository_cache=~/.cache/shared_bazel_repository_cache
|
|
|
|
|
|
|
|
# better caching / reproducibility
|
|
|
|
build --incompatible_strict_action_env=true
|
|
|
|
build --experimental_output_directory_naming_scheme=diff_against_baseline
|
|
|
|
|
|
|
|
# disable automatic toolchain detection for C/C++
|
2023-01-30 11:15:59 -05:00
|
|
|
build --incompatible_enable_cc_toolchain_resolution
|
2023-02-01 06:48:19 -05:00
|
|
|
build --action_env BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
|
2023-03-09 09:23:42 -05:00
|
|
|
|
|
|
|
# inject version information into binaries
|
2023-03-14 09:53:33 -04:00
|
|
|
build --stamp --workspace_status_command=tools/workspace_status.sh
|
2023-03-09 09:23:42 -05:00
|
|
|
|
|
|
|
# strip binaries for better reproducibility
|
|
|
|
build --strip=always
|
|
|
|
|
|
|
|
# set build mode to opt by default (better reproducibility and performance)
|
|
|
|
build --compilation_mode=opt
|
|
|
|
|
|
|
|
# enable tpm simulator for tests
|
|
|
|
test --//bazel/settings:tpm_simulator
|
|
|
|
|
|
|
|
# disable test caching (rerun all test cases even if they passed before)
|
|
|
|
test --cache_test_results=no
|
|
|
|
|
|
|
|
# bazel config for debug builds
|
|
|
|
build:debug --compilation_mode=dbg --strip=never
|
|
|
|
|
|
|
|
# bazel configs to explicitly target a platform
|
|
|
|
build:host --platforms @local_config_platform//:host
|
2023-01-30 11:15:59 -05:00
|
|
|
build:linux_amd64 --platforms @zig_sdk//libc_aware/platform:linux_amd64_gnu.2.34
|
|
|
|
build:linux_arm64 --platforms @zig_sdk//libc_aware/platform:linux_arm64_gnu.2.34
|
2023-02-01 06:48:19 -05:00
|
|
|
build:linux_amd64_static --platforms @zig_sdk//libc_aware/platform:linux_amd64_musl
|
|
|
|
build:linux_arm64_static --platforms @zig_sdk//libc_aware/platform:linux_arm64_musl
|
2023-03-09 09:23:42 -05:00
|
|
|
|
|
|
|
# bazel config to explicitly disable stamping (hide version information at build time)
|
|
|
|
build:nostamp --nostamp --workspace_status_command=
|