| 1 |
# Fail if a glob doesn't match anything (https://github.com/bazelbuild/bazel/issues/8195) |
| 2 |
build --incompatible_disallow_empty_glob |
| 3 |
|
| 4 |
build:dbg --compilation_mode=dbg |
| 5 |
|
| 6 |
build:opt --compilation_mode=opt |
| 7 |
|
| 8 |
build:san-common --config=dbg --strip=never --copt=-O0 --copt=-fno-omit-frame-pointer |
| 9 |
|
| 10 |
build:asan --config=san-common --copt=-fsanitize=address --linkopt=-fsanitize=address |
| 11 |
build:asan --copt=-DADDRESS_SANITIZER=1 |
| 12 |
# ASAN hits ODR violations with shared linkage due to rules_proto. |
| 13 |
build:asan --dynamic_mode=off |
| 14 |
|
| 15 |
build:msan --config=san-common --copt=-fsanitize=memory --linkopt=-fsanitize=memory |
| 16 |
build:msan --copt=-fsanitize-memory-track-origins |
| 17 |
build:msan --copt=-fsanitize-memory-use-after-dtor |
| 18 |
build:msan --action_env=MSAN_OPTIONS=poison_in_dtor=1 |
| 19 |
build:msan --copt=-DMEMORY_SANITIZER=1 |
| 20 |
|
| 21 |
# Use our instrumented LLVM libc++ in Kokoro. |
| 22 |
build:docker-msan --config=msan |
| 23 |
build:docker-msan --linkopt=-L/opt/libcxx_msan/lib --linkopt=-lc++abi |
| 24 |
build:docker-msan --linkopt=-Wl,-rpath,/opt/libcxx_msan/lib |
| 25 |
build:docker-msan --cxxopt=-stdlib=libc++ --linkopt=-stdlib=libc++ |
| 26 |
|
| 27 |
|
| 28 |
build:tsan --config=san-common --copt=-fsanitize=thread --linkopt=-fsanitize=thread |
| 29 |
build:tsan --copt=-DTHREAD_SANITIZER=1 |
| 30 |
|
| 31 |
build:ubsan --config=san-common --copt=-fsanitize=undefined --linkopt=-fsanitize=undefined |
| 32 |
build:ubsan --action_env=UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1 |
| 33 |
build:ubsan --copt=-DUNDEFINED_SANITIZER=1 |
| 34 |
# Workaround for the fact that Bazel links with $CC, not $CXX |
| 35 |
# https://github.com/bazelbuild/bazel/issues/11122#issuecomment-613746748 |
| 36 |
build:ubsan --copt=-fno-sanitize=function --copt=-fno-sanitize=vptr |