Imported Upstream version 1.20.0
[platform/upstream/grpc.git] / tools / bazel.rc
1 # bazelrc file
2 # bazel >= 0.18 looks for %workspace%/.bazelrc (which redirects here)
3 # Older bazel versions look for %workspace%/tools/bazel.rc (this file)
4 # See https://github.com/bazelbuild/bazel/issues/6319
5
6 build --client_env=CC=clang
7 build --copt=-DGRPC_BAZEL_BUILD
8
9 build:opt --compilation_mode=opt
10 build:opt --copt=-Wframe-larger-than=16384
11
12 build:dbg --compilation_mode=dbg
13
14 build:asan --strip=never
15 build:asan --copt=-fsanitize=address
16 build:asan --copt=-O0
17 build:asan --copt=-fno-omit-frame-pointer
18 build:asan --copt=-DGPR_NO_DIRECT_SYSCALLS
19 build:asan --copt=-DADDRESS_SANITIZER  # used by absl
20 build:asan --linkopt=-fsanitize=address
21 build:asan --action_env=ASAN_OPTIONS=detect_leaks=1:color=always
22 build:asan --action_env=LSAN_OPTIONS=suppressions=test/core/util/lsan_suppressions.txt:report_objects=1
23
24 build:msan --strip=never
25 build:msan --copt=-fsanitize=memory
26 build:msan --copt=-O0
27 build:msan --copt=-fsanitize-memory-track-origins
28 build:msan --copt=-fsanitize-memory-use-after-dtor
29 build:msan --copt=-fno-omit-frame-pointer
30 build:msan --copt=-DGPR_NO_DIRECT_SYSCALLS
31 build:msan --copt=-DMEMORY_SANITIZER  # used by absl
32 build:msan --linkopt=-fsanitize=memory
33 build:msan --action_env=MSAN_OPTIONS=poison_in_dtor=1
34
35 build:tsan --strip=never
36 build:tsan --copt=-fsanitize=thread
37 build:tsan --copt=-fno-omit-frame-pointer
38 build:tsan --copt=-DGPR_NO_DIRECT_SYSCALLS
39 build:tsan --copt=-DGRPC_TSAN
40 # TODO(jtattermusch): ideally we would set --copt=-DTHREAD_SANITIZER (used by absl)
41 # but it seems to do more harm than good and triggers #17175
42 build:tsan --linkopt=-fsanitize=thread
43 build:tsan --action_env=TSAN_OPTIONS=suppressions=test/core/util/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1
44
45 build:ubsan --strip=never
46 build:ubsan --copt=-fsanitize=undefined
47 build:ubsan --copt=-fno-omit-frame-pointer
48 build:ubsan --copt=-DGRPC_UBSAN
49 build:ubsan --copt=-DNDEBUG
50 build:ubsan --copt=-DUNDEFINED_BEHAVIOR_SANITIZER  # used by absl
51 build:ubsan --copt=-fno-sanitize=function,vptr
52 build:ubsan --linkopt=-fsanitize=undefined
53 build:ubsan --action_env=UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1:suppressions=test/core/util/ubsan_suppressions.txt
54
55 build:basicprof --strip=never
56 build:basicprof --copt=-DNDEBUG
57 build:basicprof --copt=-O2
58 build:basicprof --copt=-DGRPC_BASIC_PROFILER
59 build:basicprof --copt=-DGRPC_TIMERS_RDTSC
60
61 build:python3 --python_path=python3
62 build:python3 --force_python=PY3
63 build:python3 --action_env=PYTHON_BIN_PATH=python3