forked from Checkmk/checkmk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bazelrc
60 lines (54 loc) · 1.83 KB
/
.bazelrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# https://docs.bazel.build/versions/main/best-practices.html#using-the-bazelrc-file
try-import %workspace%/user.bazelrc
# default/common bazel args for all commands supporting it
common --experimental_ui_max_stdouterr_bytes=10000000
common --experimental_remote_cache_async
common --remote_cache_compression
# minimum blob size required to compress/decompress with zstd (1MB)
common --experimental_remote_cache_compression_threshold=1048576
common --remote_local_fallback
common --cycles
common --local_resources=cpu=HOST_CPUS-2
common --local_resources=memory=HOST_RAM*.5
## For specific commands
# Default C++ standard to C++20.
build --action_env=BAZEL_CXXOPTS="-std=c++20"
# https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-fPIC
# Required for dynamic linking.
build --copt="-fPIC"
# Always require debug info.
build --copt="-g"
clean --async
# all bazel-created temporary and build output files
# clean --expunge
# run ...
test --test_output=all
# Flags for CI builds
# Definition of "bazel x --config=ci -- ..."
## Common
common:ci --color=no
common:ci --show_progress_rate_limit=0
common:ci --show_timestamps
common:ci --memory_profile=bazel-memory.profile
common:ci --extra_toolchains="//omd/packages/toolchain:cc_toolchain_for_linux_x86_64"
common:ci --local_resources=cpu=HOST_CPUS
common:ci --local_resources=memory=HOST_RAM*.67
## For specific commands
# Add standard here as well as the CI eats environment variables.
build:ci --cxxopt="-std=c++20"
# clean:ci ...
# run:ci ...
# test:ci ...
# Flags for Debug builds
# Definition of "bazel x --config=debug -- ..."
## Common
common:debug --sandbox_debug
common:debug --subcommands=pretty_print
common:debug --announce_rc
# gRPC errors provide stack trace as well
common:debug --verbose_failures
## For specific commands
# build:debug ...
# clean:debug ...
# run:debug ...
# test:debug ...