-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.bazelrc
46 lines (37 loc) · 1.59 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
# Requires at least bazel 6.
build --enable_bzlmod
# Building the version number to be baked into the binary.
build --workspace_status_command="scripts/create-workspace-status.sh"
# build support for IWYU goals
build --features=layering_check
build --features=parse_headers
# C++, with warnings mostly turned to 11.
build --cxxopt=-std=c++23 --host_cxxopt=-std=c++23
build --cxxopt=-xc++ --host_cxxopt=-xc++
build --cxxopt=-Wall --host_cxxopt=-Wall
build --cxxopt=-Wextra --host_cxxopt=-Wextra
build --cxxopt=-Wno-unused-parameter --host_cxxopt=-Wno-unused-parameter
# Avoid costly language features.
build --cxxopt=-fno-exceptions --host_cxxopt=-fno-exceptions
build --cxxopt=-fno-rtti --host_cxxopt=-fno-rtti
# For 3rd party code: Disable warnings entirely.
# They are not actionable and just create noise.
build --per_file_copt=external/.*@-w
build --host_per_file_copt=external/.*@-w
# Platform specific options.
build --enable_platform_specific_config
build:macos --macos_minimum_os=10.15
build:macos --features=-supports_dynamic_linker
build:macos --cxxopt=-std=c++2b --host_cxxopt=-std=c++2b
# Print out test log on failure.
test --test_output=errors
# Address sanitizer settings.
build:asan --strip=never
build:asan --copt -fsanitize=address
build:asan --copt -DADDRESS_SANITIZER
build:asan --copt -O1
build:asan --copt -g
build:asan --copt -fno-omit-frame-pointer
build:asan --linkopt -fsanitize=address
# Load user-specific configuration, if any.
try-import %workspace%/user.bazelrc