Mike Kruskal | d220b43 | 2022-08-29 18:19:38 -0400 | [diff] [blame] | 1 | build --cxxopt=-std=c++14 --host_cxxopt=-std=c++14 |
Mike Kruskal | d938afd | 2022-10-06 10:50:18 -0700 | [diff] [blame] | 2 | |
| 3 | build:dbg --compilation_mode=dbg |
| 4 | |
| 5 | build:opt --compilation_mode=opt |
| 6 | |
| 7 | build:san-common --config=dbg --strip=never --copt=-O0 --copt=-fno-omit-frame-pointer |
| 8 | |
| 9 | build:asan --config=san-common --copt=-fsanitize=address --linkopt=-fsanitize=address |
| 10 | build:asan --copt=-DADDRESS_SANITIZER=1 |
| 11 | # ASAN hits ODR violations with shared linkage due to rules_proto. |
| 12 | build:asan --dynamic_mode=off |
| 13 | |
| 14 | build:msan --config=san-common --copt=-fsanitize=memory --linkopt=-fsanitize=memory |
| 15 | build:msan --copt=-fsanitize-memory-track-origins |
| 16 | build:msan --copt=-fsanitize-memory-use-after-dtor |
| 17 | build:msan --action_env=MSAN_OPTIONS=poison_in_dtor=1 |
| 18 | build:msan --copt=-DMEMORY_SANITIZER=1 |
| 19 | |
| 20 | # Use our instrumented LLVM libc++ in Kokoro. |
| 21 | build:kokoro-msan --config=msan |
| 22 | build:kokoro-msan --linkopt=-L/opt/libcxx_msan/lib |
| 23 | build:kokoro-msan --linkopt=-Wl,-rpath,/opt/libcxx_msan/lib |
| 24 | build:kokoro-msan --cxxopt=-stdlib=libc++ --linkopt=-stdlib=libc++ |
| 25 | |
| 26 | |
| 27 | build:tsan --config=san-common --copt=-fsanitize=thread --linkopt=-fsanitize=thread |
| 28 | build:tsan --copt=-DTHREAD_SANITIZER=1 |
| 29 | |
| 30 | build:ubsan --config=san-common --copt=-fsanitize=undefined --linkopt=-fsanitize=undefined |
| 31 | build:ubsan --action_env=UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1 |
| 32 | build:ubsan --copt=-DUNDEFINED_SANITIZER=1 |
| 33 | # Workaround for the fact that Bazel links with $CC, not $CXX |
| 34 | # https://github.com/bazelbuild/bazel/issues/11122#issuecomment-613746748 |
| 35 | build:ubsan --copt=-fno-sanitize=function --copt=-fno-sanitize=vptr |