-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bazelrc
67 lines (55 loc) · 2.11 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
# Not needed after https://github.com/bazelbuild/bazel/issues/7260 is closed
build --incompatible_enable_cc_toolchain_resolution
# Enable Bzlmod for every Bazel command
common --enable_bzlmod
# Registers
common --registry=file://%workspace%/bzlmod_registery
common --registry=https://bcr.bazel.build
# clang-tidy
# 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 --@bazel_clang_tidy//:clang_tidy_executable=@llvm_toolchain//:clang-tidy
build:clang-tidy --@bazel_clang_tidy//:clang_tidy_config=//:clang_tidy_config
# Build and test
build --nokeep_going
test --nokeep_going
test --test_output=errors
test --test_env=GTEST_COLOR=1
# C++17 standard
build --cxxopt=--std=c++17
test --cxxopt=--std=c++17 --test_verbose_timeout_warnings
build --host_cxxopt=--std=c++17
build --repo_env=CC=clang
build --repo_env=CXX=clang++
# Warnings
build --cxxopt=-Wall
build --cxxopt=-Wextra
build --cxxopt=-Wpedantic
build --cxxopt=-Werror
# Sanitizers
# The cc_test_with_llvm_symbolizer and cc_binary_with_llvm_symbolizer rules allow to use the llvm-symbolizer
# to symbolize stack traces from sanitizers using the LLVM toolchain.
build:sanitizers --copt=-fno-omit-frame-pointer
build:sanitizers --copt=-O1
build:sanitizers --copt=-g
build:sanitizers --strip=never
build:asan --config=sanitizers
build:asan --copt -fsanitize=address
build:asan --linkopt -fsanitize=address
build:tsan --config=sanitizers
build:tsan --copt -fsanitize=thread
build:tsan --linkopt -fsanitize=thread
build:msan --config=sanitizers
build:msan --copt=-fsanitize=memory
build:msan --copt=-fno-optimize-sibling-calls
build:msan --copt=-fsanitize-memory-track-origins
build:msan --copt -fsanitize-memory-use-after-dtor
build:msan --linkopt=-fsanitize=memory
build:ubsan --config=sanitizers
build:ubsan --copt=-fsanitize=undefined
build:ubsan --linkopt=-fsanitize=undefined
build:ubsan --linkopt=-fsanitize-link-c++-runtime
build:sssan --config=sanitizers
build:sssan --copt=-fsanitize=safe-stack
build:sssan --linkopt=-fsanitize=safe-stack