-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bazelrc
56 lines (46 loc) · 1.64 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
build --cxxopt='-std=c++20'
build --verbose_failures
build --show_result='100'
# Required for bazel_clang_tidy to operate as expected
build:clang-tidy --aspects @bazel_clang_tidy//clang_tidy:clang_tidy.bzl%clang_tidy_aspect
build:clang-tidy --output_groups=report
build:clang-tidy --repo_env='BAZEL_CXXOPTS=-stdlib=libc++'
build:clang-tidy --repo_env='BAZEL_LINKLIBS=-lc++:-lm'
# Sanitizers don't work too well on Apple-Clang, use GCC instead
# Address sanitizer
# To use it: bazel build --config=asan
build:asan --strip=never
build:asan --copt -fsanitize=address
build:asan --copt -DADDRESS_SANITIZER
build:asan --copt -O1
build:asan --copt -g
build:asan --copt -fno-omit-frame-pointer
build:asan --linkopt -fsanitize=address
build:asan --repo_env='ASAN_OPTIONS=detect_leaks=1:color=always'
# Thread sanitizer
# bazel build --config=tsan
build:tsan --strip=never
build:tsan --copt -g
build:tsan --copt -fsanitize=thread
build:tsan --copt -DTHREAD_SANITIZER
build:tsan --copt -DDYNAMIC_ANNOTATIONS_ENABLED=1
build:tsan --copt -DDYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1
build:tsan --copt -O1
build:tsan --copt -fno-omit-frame-pointer
build:tsan --linkopt -fsanitize=thread
# Undefined Behavior Sanitizer
# bazel build --config=ubsan
build:ubsan --strip=never
build:ubsan --copt -fsanitize=undefined
build:ubsan --copt -O1
build:ubsan --copt -fno-omit-frame-pointer
build:ubsan --linkopt -fsanitize=undefined
build:ubsan --linkopt -lubsan
test --keep_going
test --build_tests_only
test --test_output=errors
test --test_summary=detailed
test --test_timeout=15,-1,-1,-1
# https://github.com/bazelbuild/bazel/issues/7091
build --build_python_zip
try-import %workspace%/.bazelrc.user