blob: 7b9da717aa2b59d27f4d8ab301dbfe6ad7283982 [file] [log] [blame]
Joshua Haberman0497f8d2020-11-02 19:00:23 -08001# Use our custom-configured c++ toolchain.
2
3build:m32 --copt=-m32 --linkopt=-m32
4build:asan --copt=-fsanitize=address --linkopt=-fsanitize=address
5build:valgrind --run_under='valgrind --leak-check=full --error-exitcode=1'
6
7build:ubsan --copt=-fsanitize=undefined --linkopt=-fsanitize=undefined --action_env=UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1
8# Workaround for the fact that Bazel links with $CC, not $CXX
9# https://github.com/bazelbuild/bazel/issues/11122#issuecomment-613746748
10build:ubsan --copt=-fno-sanitize=function --copt=-fno-sanitize=vptr
11
Joshua Haberman5b1f0d82020-11-02 21:22:51 -080012build:Werror --copt=-Werror
13build:Werror --per_file_copt=json/parser@-Wno-error
14build:Werror --per_file_copt=com_google_protobuf@-Wno-error
15
16# GCC's -fanalyzer, a deeper static analysis than normal warnings.
17build:analyzer --copt=-fanalyzer --copt=-Werror
18build:analyzer --per_file_copt=json/parser@-fno-analyzer
19build:analyzer --per_file_copt=com_google_protobuf@-fno-analyzer
20build:analyzer --per_file_copt=com_github_google_benchmark@-fno-analyzer
Joshua Haberman982b6342020-11-05 15:32:20 -080021
22build:asan-fuzzer --copt=-fsanitize=address,fuzzer --linkopt=-fsanitize=address,fuzzer --define fuzz=true