mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-26 07:59:37 -05:00
bdba9d8ba6
* build: correct toolchain order * build: gazelle-update-repos * build: use pregenerated proto for dependencies * update bazeldnf * deps: tpm simulator * Update Google trillian module * cli: add stamping as alternative build info source * bazel: add go_test wrappers, mark special tests and select testing deps * deps: add libvirt deps * deps: go-libvirt patches * deps: cloudflare circl patches * bazel: add go_test wrappers, mark special tests and select testing deps * bazel: keep gazelle overrides * bazel: cleanup bazelrc * bazel: switch CMakeLists.txt to use bazel * bazel: fix injection of version information via stamping * bazel: commit all build files * dev-docs: document bazel usage * deps: upgrade zig-cc for go 1.20 * bazel: update Perl for macOS arm64 & Linux arm64 support * bazel: use static perl toolchain for OpenSSL * bazel: use static protobuf (protoc) toolchain * deps: add git and go to nix deps Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
49 lines
2.0 KiB
Plaintext
49 lines
2.0 KiB
Plaintext
# 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++
|
|
build --incompatible_enable_cc_toolchain_resolution
|
|
build --action_env BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
|
|
|
|
# disable automatic toolchain detection for Java
|
|
build --incompatible_use_toolchain_resolution_for_java_rules
|
|
build --java_runtime_version=pinned_remotejdk_11
|
|
build --tool_java_runtime_version=pinned_remotejdk_11
|
|
|
|
# inject version information into binaries
|
|
build --stamp --workspace_status_command=tools/workspace_status
|
|
|
|
# strip binaries for better reproducibility
|
|
build --strip=always
|
|
|
|
# set build mode to opt by default (better reproducibility and performance)
|
|
build --compilation_mode=opt
|
|
|
|
# compile for linux_amd64 by default (this is the target for any binaries that go into the cluster)
|
|
build --platforms @zig_sdk//libc_aware/platform:linux_amd64_gnu.2.34
|
|
|
|
# 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
|
|
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
|
|
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
|
|
|
|
# bazel config to explicitly disable stamping (hide version information at build time)
|
|
build:nostamp --nostamp --workspace_status_command=
|