forked from googleapis/google-cloud-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bazelrc
81 lines (73 loc) · 2.83 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
# 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 incovenient 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
build:tsan --action_env=TSAN_OPTIONS=halt_on_error=1:second_deadlock_stack=1
# --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 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=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