Adam Cozzette | d99134f | 2023-08-09 11:26:22 -0700 | [diff] [blame] | 1 | build --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 |
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 | |
Mike Kruskal | d938afd | 2022-10-06 10:50:18 -0700 | [diff] [blame] | 20 | build:tsan --config=san-common --copt=-fsanitize=thread --linkopt=-fsanitize=thread |
| 21 | build:tsan --copt=-DTHREAD_SANITIZER=1 |
| 22 | |
| 23 | build:ubsan --config=san-common --copt=-fsanitize=undefined --linkopt=-fsanitize=undefined |
| 24 | build:ubsan --action_env=UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1 |
| 25 | build:ubsan --copt=-DUNDEFINED_SANITIZER=1 |
| 26 | # Workaround for the fact that Bazel links with $CC, not $CXX |
| 27 | # https://github.com/bazelbuild/bazel/issues/11122#issuecomment-613746748 |
| 28 | build:ubsan --copt=-fno-sanitize=function --copt=-fno-sanitize=vptr |