mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-30 09:56:21 -05:00
61 lines
2.5 KiB
Plaintext
61 lines
2.5 KiB
Plaintext
# Import bazelrc presets
|
|
import %workspace%/bazel/bazelrc/bazel6.bazelrc
|
|
import %workspace%/bazel/bazelrc/convenience.bazelrc
|
|
import %workspace%/bazel/bazelrc/correctness.bazelrc
|
|
import %workspace%/bazel/bazelrc/debug.bazelrc
|
|
import %workspace%/bazel/bazelrc/performance.bazelrc
|
|
import %workspace%/bazel/bazelrc/cc.bazelrc
|
|
|
|
# share bazel cache between checkouts of the same project
|
|
# and keep old build caches around for longer
|
|
common --disk_cache=~/.cache/shared_bazel_action_cache
|
|
common --repository_cache=~/.cache/shared_bazel_repository_cache
|
|
|
|
# inject version information into binaries
|
|
common --stamp --workspace_status_command=tools/workspace_status.sh
|
|
|
|
# strip binaries for better reproducibility
|
|
common --strip=always
|
|
|
|
# set build mode to opt by default (better reproducibility and performance)
|
|
common --compilation_mode=opt
|
|
|
|
# use pure go implementation of netdns
|
|
common --define=gotags=netgo
|
|
|
|
# enable tpm simulator for tests
|
|
test --//bazel/settings:tpm_simulator
|
|
|
|
# set registry flag alias
|
|
build --flag_alias=container_prefix=//bazel/settings:container_prefix
|
|
|
|
# set cli edition flag alias
|
|
build --flag_alias=cli_edition=//bazel/settings:cli_edition
|
|
|
|
# bazel configs to explicitly target a platform
|
|
common:host --platforms @local_config_platform//:host
|
|
common:linux_amd64 --platforms @zig_sdk//libc_aware/platform:linux_amd64_gnu.2.23
|
|
common:linux_arm64 --platforms @zig_sdk//libc_aware/platform:linux_arm64_gnu.2.23
|
|
common:linux_amd64_static --platforms @zig_sdk//libc_aware/platform:linux_amd64_musl
|
|
common:linux_arm64_static --platforms @zig_sdk//libc_aware/platform:linux_arm64_musl
|
|
|
|
# bazel configs to explicitly target NixOS
|
|
common:nix --host_platform=@io_tweag_rules_nixpkgs//nixpkgs/platforms:host
|
|
common:nix --crosstool_top=@local_config_cc//:toolchain
|
|
common:nix --action_env=BAZEL_NIX_HOST_PLATFORM=1
|
|
|
|
# bazel config to explicitly disable stamping (hide version information at build time)
|
|
common:nostamp --nostamp --workspace_status_command=
|
|
|
|
# bazel config to use remote cache
|
|
common:remote_cache --bes_results_url=https://app.buildbuddy.io/invocation/
|
|
common:remote_cache --bes_backend=grpcs://remote.buildbuddy.io
|
|
common:remote_cache --remote_cache=grpcs://remote.buildbuddy.io
|
|
common:remote_cache --remote_timeout=3600
|
|
common:remote_cache --experimental_remote_build_event_upload=minimal
|
|
common:remote_cache --experimental_remote_cache_compression
|
|
common:remote_cache --nolegacy_important_outputs
|
|
common:remote_cache_readonly --noremote_upload_local_results # Uploads logs & artifacts without writing to cache
|
|
|
|
try-import %workspace%/.bazeloverwriterc
|