forked from googleapis/google-cloud-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bazelrc
99 lines (90 loc) · 3.63 KB
/
.bazelrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# To workaround a bug in Bazel [1], gRPC requires this flag on macOS builds,
# and there is (AFAIK) no way to "inherit" their definitions.
# [1]: https://github.com/bazelbuild/bazel/issues/4341
build --copt=-DGRPC_BAZEL_BUILD
# Do not create the convenience links, they are inconvenient when the build runs
# inside a docker image.
build --experimental_convenience_symlinks=ignore
# Clang Sanitizers, use with (for example):
#
# --client_env=CXX=clang++ --client_env=CC=clang --config asan
#
# --config asan: Address Sanitizer
build:asan --strip=never
build:asan --copt=-Og
build:asan --copt=-g
build:asan --copt=-fsanitize=address
build:asan --copt=-fno-omit-frame-pointer
build:asan --linkopt=-fsanitize=address
build:asan --action_env=ASAN_OPTIONS=detect_leaks=1:color=always
build:asan --action_env=LSAN_OPTIONS=report_objects=1
# --config tsan: Thread Sanitizer
build:tsan --strip=never
build:tsan --copt=-Og
build:tsan --copt=-g
build:tsan --copt=-fsanitize=thread
build:tsan --copt=-fno-omit-frame-pointer
build:tsan --linkopt=-fsanitize=thread
# report_atomic_races=0: https://github.com/google/sanitizers/issues/953
build:tsan --action_env=TSAN_OPTIONS=halt_on_error=1:second_deadlock_stack=1:report_atomic_races=0
# --config ubsan: Undefined Behavior Sanitizer
build:ubsan --strip=never
build:ubsan --copt=-Og
build:ubsan --copt=-g
build:ubsan --copt=-fsanitize=undefined
build:ubsan --copt=-fno-omit-frame-pointer
build:ubsan --linkopt=-fsanitize=undefined
build:ubsan --linkopt=-fsanitize-link-c++-runtime
build:ubsan --action_env=UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1
build:ubsan --cxxopt=-stdlib=libc++
build:ubsan --linkopt=-stdlib=libc++
build:ubsan --linkopt=-lc++
build:ubsan --linkopt=-lc++abi
# --config xsan: Runs misc. sanitizers that aren't covered elsewhere.
build:xsan --strip=never
build:xsan --copt=-Og
build:xsan --copt=-g
build:xsan --copt=-fsanitize=float-divide-by-zero
build:xsan --copt=-fsanitize=nullability
build:xsan --copt=-fno-omit-frame-pointer
build:xsan --cxxopt=-stdlib=libc++
build:xsan --linkopt=-stdlib=libc++
build:xsan --linkopt=-lc++
build:xsan --linkopt=-lc++abi
build:xsan --linkopt=-fsanitize-link-c++-runtime
build:xsan --linkopt=-fsanitize=float-divide-by-zero
build:xsan --linkopt=-fsanitize=nullability
build:xsan --action_env=UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1
# --config msan: Memory Sanitizer
build:msan --strip=never
build:msan --copt=-Og
build:msan --copt=-g
build:msan --copt=-fsanitize=memory
build:msan --copt=-fno-omit-frame-pointer
build:msan --copt=-fsanitize-memory-track-origins
build:msan --copt=-fsanitize-memory-use-after-dtor
build:msan --linkopt=-fsanitize=memory
build:msan --action_env=LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib:/usr/lib64:/usr/lib:/lib64:/lib
build:msan --action_env=MSAN_OPTIONS=poison_in_dtor=1
build:msan --cxxopt=-stdlib=libc++
build:msan --linkopt=-stdlib=libc++
build:msan --linkopt=-lc++
build:msan --linkopt=-lc++abi
# --config libcxx: Compile and link using libc++.
build:libcxx --cxxopt=-stdlib=libc++
build:libcxx --linkopt=-stdlib=libc++
build:libcxx --linkopt=-lc++
build:libcxx --linkopt=-lc++abi