-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bazelrc
42 lines (34 loc) · 1.46 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
build --enable_platform_specific_config
# Use registered clang toolchain.
build:linux --incompatible_enable_cc_toolchain_resolution
# C++20
build:c++20 --cxxopt=-std=c++20
# Also add "-lm" flag to avoid linker errors like "undefined reference to nan" for absl
build:with-absl --action_env=BAZEL_LINKLIBS=-lm
build:with-absl --define absl=1
build --config=c++20 #--config=with-absl
# Fixes symbols when debugging on mac.
build:macos --features=oso_prefix_is_pwd
# Coverage builds
coverage --config=coverage
build:coverage --action_env=BAZEL_USE_LLVM_NATIVE_COVERAGE=1
build:coverage --action_env=GCOV=llvm-profdata
build:coverage --action_env=BAZEL_LLVM_COV=llvm-cov
build:coverage --experimental_generate_llvm_lcov
build:coverage --collect_code_coverage
build:coverage --combined_report=lcov
# Basic ASAN/UBSAN that works for gcc
build:asan --linkopt -ldl
build:asan --copt -fsanitize=address,undefined
build:asan --linkopt -fsanitize=address,undefined
build:asan --test_env=ASAN_SYMBOLIZER_PATH
# These require libubsan, which is not linked properly by bazel, so disable.
# See https://github.com/google/oss-fuzz/issues/713
build:asan --copt -fno-sanitize=vptr,function
build:asan --linkopt -fno-sanitize=vptr,function
# Fuzzing builds
build:asan-fuzzer --config=asan
build:asan-fuzzer --define=FUZZING_ENGINE=libfuzzer
build:asan-fuzzer --copt=-fsanitize=fuzzer-no-link
build:asan-fuzzer --copt=-fno-omit-frame-pointer
build:asan-fuzzer --copt=-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION