2024-01-08 08:38:13 -05:00
|
|
|
# Sadly, some Bazel rules we depend on have no support for bzlmod yet
|
|
|
|
# Here is an (incomplete) list of rules known to not support bzlmod.
|
|
|
|
# Please extend this list as you find more.
|
|
|
|
# - rules_nixpkgs: https://github.com/tweag/rules_nixpkgs/issues/181
|
|
|
|
common --noenable_bzlmod
|
|
|
|
|
2023-08-18 09:12:21 -04:00
|
|
|
# Import bazelrc presets
|
2024-01-08 08:38:13 -05:00
|
|
|
import %workspace%/bazel/bazelrc/bazel7.bazelrc
|
2023-08-18 09:12:21 -04:00
|
|
|
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
|
|
|
|
|
2023-03-09 09:23:42 -05:00
|
|
|
# inject version information into binaries
|
2023-08-16 06:37:29 -04:00
|
|
|
common --stamp --workspace_status_command=tools/workspace_status.sh
|
2023-03-09 09:23:42 -05:00
|
|
|
|
|
|
|
# strip binaries for better reproducibility
|
2023-08-16 06:37:29 -04:00
|
|
|
common --strip=always
|
2023-03-09 09:23:42 -05:00
|
|
|
|
|
|
|
# set build mode to opt by default (better reproducibility and performance)
|
2023-08-16 06:37:29 -04:00
|
|
|
common --compilation_mode=opt
|
2023-03-09 09:23:42 -05:00
|
|
|
|
2023-03-21 12:02:26 -04:00
|
|
|
# use pure go implementation of netdns
|
2023-08-16 06:37:29 -04:00
|
|
|
common --define=gotags=netgo
|
2023-03-21 12:02:26 -04:00
|
|
|
|
2023-03-09 09:23:42 -05:00
|
|
|
# enable tpm simulator for tests
|
|
|
|
test --//bazel/settings:tpm_simulator
|
|
|
|
|
2023-04-27 05:52:02 -04:00
|
|
|
# set registry flag alias
|
|
|
|
build --flag_alias=container_prefix=//bazel/settings:container_prefix
|
|
|
|
|
2023-05-30 03:05:36 -04:00
|
|
|
# set cli edition flag alias
|
|
|
|
build --flag_alias=cli_edition=//bazel/settings:cli_edition
|
|
|
|
|
2023-11-22 07:07:58 -05:00
|
|
|
# disable integration tests by default
|
|
|
|
test --test_tag_filters=-integration
|
|
|
|
# enable all tests (including integration)
|
|
|
|
test:integration --test_tag_filters= --@io_bazel_rules_go//go/config:tags=integration
|
|
|
|
# enable only integration tests
|
2023-12-22 04:16:36 -05:00
|
|
|
test:integration-only --test_tag_filters=+integration --@io_bazel_rules_go//go/config:tags=integration,enterprise
|
2023-11-22 07:07:58 -05:00
|
|
|
|
2023-03-09 09:23:42 -05:00
|
|
|
# bazel configs to explicitly target a platform
|
2023-08-16 06:37:29 -04:00
|
|
|
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
|
2023-03-09 09:23:42 -05:00
|
|
|
|
2023-09-07 04:53:42 -04:00
|
|
|
# bazel configs to explicitly target NixOS
|
2023-10-04 04:51:17 -04:00
|
|
|
common --host_platform=@io_tweag_rules_nixpkgs//nixpkgs/platforms:host
|
|
|
|
common --crosstool_top=@local_config_cc//:toolchain
|
2023-09-07 04:53:42 -04:00
|
|
|
|
2023-03-09 09:23:42 -05:00
|
|
|
# bazel config to explicitly disable stamping (hide version information at build time)
|
2023-08-16 06:37:29 -04:00
|
|
|
common:nostamp --nostamp --workspace_status_command=
|
2023-03-20 11:05:08 -04:00
|
|
|
|
2023-11-03 06:45:58 -04:00
|
|
|
common:build_barn_rbe_ubuntu_22_04 --remote_timeout=3600
|
|
|
|
common:build_barn_rbe_ubuntu_22_04 --remote_executor=grpc://frontend.buildbarn:8980 # this maps to the kubernetes internal buildbarn/frontend service
|
|
|
|
common:build_barn_rbe_ubuntu_22_04 --extra_execution_platforms=//bazel/rbe:ubuntu-act-22-04-platform
|
|
|
|
common:build_barn_rbe_ubuntu_22_04 --shell_executable=/bin/bash
|
|
|
|
|
2023-04-27 05:52:02 -04:00
|
|
|
try-import %workspace%/.bazeloverwriterc
|