aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/bazel.rc
diff options
context:
space:
mode:
Diffstat (limited to 'tools/bazel.rc')
-rw-r--r--tools/bazel.rc8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/bazel.rc b/tools/bazel.rc
index d33e6e086b..59e597b472 100644
--- a/tools/bazel.rc
+++ b/tools/bazel.rc
@@ -6,13 +6,17 @@
build --client_env=CC=clang
build --copt=-DGRPC_BAZEL_BUILD
+build:opt --compilation_mode=opt
build:opt --copt=-Wframe-larger-than=16384
+build:dbg --compilation_mode=dbg
+
build:asan --strip=never
build:asan --copt=-fsanitize=address
build:asan --copt=-O0
build:asan --copt=-fno-omit-frame-pointer
build:asan --copt=-DGPR_NO_DIRECT_SYSCALLS
+build:asan --copt=-DADDRESS_SANITIZER # used by absl
build:asan --linkopt=-fsanitize=address
build:asan --action_env=ASAN_OPTIONS=detect_leaks=1:color=always
build:asan --action_env=LSAN_OPTIONS=suppressions=test/core/util/lsan_suppressions.txt:report_objects=1
@@ -24,6 +28,7 @@ build:msan --copt=-fsanitize-memory-track-origins
build:msan --copt=-fsanitize-memory-use-after-dtor
build:msan --copt=-fno-omit-frame-pointer
build:msan --copt=-DGPR_NO_DIRECT_SYSCALLS
+build:msan --copt=-DMEMORY_SANITIZER # used by absl
build:msan --linkopt=-fsanitize=memory
build:msan --action_env=MSAN_OPTIONS=poison_in_dtor=1
@@ -32,6 +37,8 @@ build:tsan --copt=-fsanitize=thread
build:tsan --copt=-fno-omit-frame-pointer
build:tsan --copt=-DGPR_NO_DIRECT_SYSCALLS
build:tsan --copt=-DGRPC_TSAN
+# TODO(jtattermusch): ideally we would set --copt=-DTHREAD_SANITIZER (used by absl)
+# but it seems to do more harm than good and triggers #17175
build:tsan --linkopt=-fsanitize=thread
build:tsan --action_env=TSAN_OPTIONS=suppressions=test/core/util/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1
@@ -40,6 +47,7 @@ build:ubsan --copt=-fsanitize=undefined
build:ubsan --copt=-fno-omit-frame-pointer
build:ubsan --copt=-DGRPC_UBSAN
build:ubsan --copt=-DNDEBUG
+build:ubsan --copt=-DUNDEFINED_BEHAVIOR_SANITIZER # used by absl
build:ubsan --copt=-fno-sanitize=function,vptr
build:ubsan --linkopt=-fsanitize=undefined
build:ubsan --action_env=UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1:suppressions=test/core/util/ubsan_suppressions.txt