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 12build:dbg --copt=-Werror=return-stack-address 13 14build:windows_opt --compilation_mode=opt 15build:windows_dbg --compilation_mode=dbg 16 17build:asan --strip=never 18build:asan --copt=-fsanitize=address 19build:asan --copt=-O0 20build:asan --copt=-fno-omit-frame-pointer 21build:asan --copt=-DGPR_NO_DIRECT_SYSCALLS 22build:asan --copt=-DGRPC_ASAN 23build:asan --copt=-DADDRESS_SANITIZER # used by absl 24build:asan --linkopt=-fsanitize=address 25build:asan --action_env=ASAN_OPTIONS=detect_leaks=1:color=always 26build:asan --action_env=LSAN_OPTIONS=suppressions=test/core/util/lsan_suppressions.txt:report_objects=1 27 28# We have a separate ASAN config for Mac OS to workaround a couple of bugs: 29# 1. https://github.com/bazelbuild/bazel/issues/6932 30# _FORTIFY_SOURCE=1 is enabled by default on Mac OS, which breaks ASAN. 31# We workaround it by setting _FORTIFY_SOURCE=0 and ignoring macro redefined 32# warnings. 33# 2. https://github.com/google/sanitizers/issues/1026 34# LSAN is not supported by the version of Clang that ships with Mac OS, so 35# we disable it. 36build:asan_macos --strip=never 37build:asan_macos --copt=-fsanitize=address 38build:asan_macos --copt -Wno-macro-redefined 39build:asan_macos --copt -D_FORTIFY_SOURCE=0 40build:asan_macos --copt=-fsanitize=address 41build:asan_macos --copt=-O0 42build:asan_macos --copt=-fno-omit-frame-pointer 43build:asan_macos --copt=-DGPR_NO_DIRECT_SYSCALLS 44build:asan_macos --linkopt=-fsanitize=address 45build:asan_macos --action_env=ASAN_OPTIONS=detect_leaks=0 46 47build:msan --strip=never 48build:msan --copt=-fsanitize=memory 49build:msan --copt=-O0 50build:msan --copt=-fsanitize-memory-track-origins 51build:msan --copt=-fsanitize-memory-use-after-dtor 52build:msan --copt=-fno-omit-frame-pointer 53build:msan --copt=-DGPR_NO_DIRECT_SYSCALLS 54build:msan --linkopt=-fsanitize=memory 55build:msan --action_env=MSAN_OPTIONS=poison_in_dtor=1 56 57build:tsan --strip=never 58build:tsan --copt=-fsanitize=thread 59build:tsan --copt=-fno-omit-frame-pointer 60build:tsan --copt=-DGPR_NO_DIRECT_SYSCALLS 61build:tsan --copt=-DGRPC_TSAN 62build:tsan --linkopt=-fsanitize=thread 63# This is needed to address false positive problem with abseil. 64# https://github.com/google/sanitizers/issues/953 65build:tsan --test_env=TSAN_OPTIONS=report_atomic_races=0 66build:tsan --action_env=TSAN_OPTIONS=suppressions=test/core/util/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1 67 68build:ubsan --strip=never 69build:ubsan --copt=-fsanitize-link-c++-runtime 70build:ubsan --copt=-fno-omit-frame-pointer 71build:ubsan --copt=-DGRPC_UBSAN 72build:ubsan --copt=-DNDEBUG 73build:ubsan --copt=-fno-sanitize=function,vptr 74build:ubsan --linkopt=-fsanitize-link-c++-runtime 75build:ubsan --action_env=UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1:suppressions=test/core/util/ubsan_suppressions.txt 76# For some reasons, these two stopped being propagated, so, redeclaring them here. 77# That's a hack that needs to be removed once we understand what's going on. 78build:ubsan --copt=-DGRPC_PORT_ISOLATED_RUNTIME=1 79 80build:basicprof --strip=never 81build:basicprof --copt=-DNDEBUG 82build:basicprof --copt=-O2 83build:basicprof --copt=-DGRPC_BASIC_PROFILER 84build:basicprof --copt=-DGRPC_TIMERS_RDTSC 85 86build:python_single_threaded_unary_stream --test_env="GRPC_SINGLE_THREADED_UNARY_STREAM=true" 87 88build:python_poller_engine --test_env="GRPC_ASYNCIO_ENGINE=poller" 89 90# "counters" config is based on a legacy config provided by the Makefile (see definition in build_handwritten.yaml). 91# It is only used in microbenchmarks. 92# TODO(jtattermusch): get rid of the "counters" config when possible 93build:counters --compilation_mode=opt 94build:counters --copt=-Wframe-larger-than=16384 95build:counters --copt=-DGPR_LOW_LEVEL_COUNTERS 96 97# "mutrace" config is based on a legacy config provided by the Makefile (see definition in build_handwritten.yaml). 98# It is only used in microbenchmarks (see tools/run_tests/run_microbenchmark.py) 99# TODO(jtattermusch): get rid of the "mutrace" config when possible 100build:mutrace --copt=-O3 101build:mutrace --copt=-fno-omit-frame-pointer 102build:mutrace --copt=-DNDEBUG 103build:mutrace --linkopt=-rdynamic 104 105# Compile database generation config 106build:compdb --build_tag_filters=-nocompdb 107