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 |
Mike Kruskal | d938afd | 2022-10-06 10:50:18 -0700 | [diff] [blame] | 10 | # ASAN hits ODR violations with shared linkage due to rules_proto. |
| 11 | build:asan --dynamic_mode=off |
| 12 | |
| 13 | build:msan --config=san-common --copt=-fsanitize=memory --linkopt=-fsanitize=memory |
| 14 | build:msan --copt=-fsanitize-memory-track-origins |
| 15 | build:msan --copt=-fsanitize-memory-use-after-dtor |
| 16 | build:msan --action_env=MSAN_OPTIONS=poison_in_dtor=1 |
Mike Kruskal | d938afd | 2022-10-06 10:50:18 -0700 | [diff] [blame] | 17 | |
Mike Kruskal | d938afd | 2022-10-06 10:50:18 -0700 | [diff] [blame] | 18 | build:tsan --config=san-common --copt=-fsanitize=thread --linkopt=-fsanitize=thread |
Mike Kruskal | d938afd | 2022-10-06 10:50:18 -0700 | [diff] [blame] | 19 | |
| 20 | build:ubsan --config=san-common --copt=-fsanitize=undefined --linkopt=-fsanitize=undefined |
| 21 | build:ubsan --action_env=UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1 |
Mike Kruskal | d938afd | 2022-10-06 10:50:18 -0700 | [diff] [blame] | 22 | # Workaround for the fact that Bazel links with $CC, not $CXX |
| 23 | # https://github.com/bazelbuild/bazel/issues/11122#issuecomment-613746748 |
| 24 | build:ubsan --copt=-fno-sanitize=function --copt=-fno-sanitize=vptr |
Protobuf Team Bot | 3129868 | 2023-10-12 08:55:44 -0700 | [diff] [blame] | 25 | |
| 26 | # TODO: migrate all dependencies from WORKSPACE to MODULE.bazel |
| 27 | # https://github.com/protocolbuffers/protobuf/issues/14313 |
| 28 | common --noenable_bzlmod |