1# bazelrc file 2 3build --client_env=CC=clang 4build --copt=-DGRPC_BAZEL_BUILD 5build --action_env=GRPC_BAZEL_RUNTIME=1 6build --define=use_fast_cpp_protos=true 7 8build:opt --compilation_mode=opt 9build:opt --copt=-Wframe-larger-than=16384 10 11build:dbg --compilation_mode=dbg 12 13build:windows_opt --compilation_mode=opt 14build:windows_dbg --compilation_mode=dbg 15 16build:asan --strip=never 17build:asan --copt=-fsanitize=address 18build:asan --copt=-O0 19build:asan --copt=-fno-omit-frame-pointer 20build:asan --copt=-DGPR_NO_DIRECT_SYSCALLS 21build:asan --copt=-DGRPC_ASAN 22build:asan --copt=-DADDRESS_SANITIZER # used by absl 23build:asan --linkopt=-fsanitize=address 24build:asan --action_env=ASAN_OPTIONS=detect_leaks=1:color=always 25build:asan --action_env=LSAN_OPTIONS=suppressions=test/core/util/lsan_suppressions.txt:report_objects=1 26 27# We have a separate ASAN config for Mac OS to workaround a couple of bugs: 28# 1. https://github.com/bazelbuild/bazel/issues/6932 29# _FORTIFY_SOURCE=1 is enabled by default on Mac OS, which breaks ASAN. 30# We workaround it by setting _FORTIFY_SOURCE=0 and ignoring macro redefined 31# warnings. 32# 2. https://github.com/google/sanitizers/issues/1026 33# LSAN is not supported by the version of Clang that ships with Mac OS, so 34# we disable it. 35build:asan_macos --strip=never 36build:asan_macos --copt=-fsanitize=address 37build:asan_macos --copt -Wno-macro-redefined 38build:asan_macos --copt -D_FORTIFY_SOURCE=0 39build:asan_macos --copt=-fsanitize=address 40build:asan_macos --copt=-O0 41build:asan_macos --copt=-fno-omit-frame-pointer 42build:asan_macos --copt=-DGPR_NO_DIRECT_SYSCALLS 43build:asan_macos --copt=-DADDRESS_SANITIZER # used by absl 44build:asan_macos --linkopt=-fsanitize=address 45build:asan_macos --action_env=ASAN_OPTIONS=detect_leaks=0 46 47 48build:msan --strip=never 49build:msan --copt=-fsanitize=memory 50build:msan --copt=-O0 51build:msan --copt=-fsanitize-memory-track-origins 52build:msan --copt=-fsanitize-memory-use-after-dtor 53build:msan --copt=-fno-omit-frame-pointer 54build:msan --copt=-DGPR_NO_DIRECT_SYSCALLS 55build:msan --copt=-DMEMORY_SANITIZER # used by absl 56build:msan --linkopt=-fsanitize=memory 57build:msan --action_env=MSAN_OPTIONS=poison_in_dtor=1 58 59build:tsan --strip=never 60build:tsan --copt=-fsanitize=thread 61build:tsan --copt=-fno-omit-frame-pointer 62build:tsan --copt=-DGPR_NO_DIRECT_SYSCALLS 63build:tsan --copt=-DGRPC_TSAN 64# TODO(jtattermusch): ideally we would set --copt=-DTHREAD_SANITIZER (used by absl) 65# but it seems to do more harm than good and triggers #17175 66build:tsan --linkopt=-fsanitize=thread 67build:tsan --action_env=TSAN_OPTIONS=suppressions=test/core/util/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1 68 69build:ubsan --strip=never 70build:ubsan --copt=-fsanitize=undefined 71build:ubsan --copt=-fno-omit-frame-pointer 72build:ubsan --copt=-DGRPC_UBSAN 73build:ubsan --copt=-DNDEBUG 74build:ubsan --copt=-DUNDEFINED_BEHAVIOR_SANITIZER # used by absl 75build:ubsan --copt=-fno-sanitize=function,vptr 76build:ubsan --linkopt=-fsanitize=undefined 77build:ubsan --action_env=UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1:suppressions=test/core/util/ubsan_suppressions.txt 78# For some reasons, these two stopped being propagated, so, redeclaring them here. 79# That's a hack that needs to be removed once we understand what's going on. 80build:ubsan --copt=-DGRPC_PORT_ISOLATED_RUNTIME=1 81 82build:basicprof --strip=never 83build:basicprof --copt=-DNDEBUG 84build:basicprof --copt=-O2 85build:basicprof --copt=-DGRPC_BASIC_PROFILER 86build:basicprof --copt=-DGRPC_TIMERS_RDTSC 87 88build:python_single_threaded_unary_stream --test_env="GRPC_SINGLE_THREADED_UNARY_STREAM=true" 89 90build:python_poller_engine --test_env="GRPC_ASYNCIO_ENGINE=poller" 91