-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.bazelrc
86 lines (71 loc) · 3.04 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
# Platform independent configuration
build --workspace_status_command "python config/workspace-status.py"
build --incompatible_enable_cc_toolchain_resolution
# We would turn this on globally, but unfortunately
# it kills external libraries
# build --cxxopt=-Wall
# build --cxxopt=-Wextra
# build --cxxopt=-Wconversion
# build --cxxopt=-Wpedantic
# build --cxxopt=-Werror
# build --disk_cache=~/.cache/bazel/
build --features=external_include_paths
# Set the default compiler to the `clang` binary on the `PATH`.
build:clang --repo_env=CC=clang
# C++17 standard version is required.
build:clang --cxxopt=-std=c++17
build:clang --host_cxxopt=-std=c++17
# Use `-Wall` and `-Werror` for Clang.
# build:clang --copt=-Wall --copt=-Werror --host_copt=-Wall --host_copt=-Werror
# C++ 17
build:msvc --cxxopt=/std:c++17
build:msvc --host_cxxopt=/std:c++17
# Other MSVC specific config
build:msvc --copt=/w
build:msvc --cxxopt=/w
build:msvc --host_copt=/w
build:msvc --host_cxxopt=/w
# build:msvc --copt=/WX --host_copt=/WX # Treat warnings as errors...
# ...but disable the ones that are violated
build:msvc --copt=/wd4141 --host_copt=/wd4141 # inline used more than once
build:msvc --copt=/wd4244 --host_copt=/wd4244 # conversion type -> type
build:msvc --copt=/wd4267 --host_copt=/wd4267 # conversion size_t -> type
build:msvc --copt=/wd4273 --host_copt=/wd4273 # multiple definitions with different dllimport
build:msvc --copt=/wd4319 --host_copt=/wd4319 # zero-extending after complement
build:msvc --copt=/wd4624 --host_copt=/wd4624 # destructor was implicitly defined as deleted
build:msvc --copt=/wd4804 --host_copt=/wd4804 # comparisons between bool and int
build:msvc --copt=/wd4805 --host_copt=/wd4805 # comparisons between bool and int
# build:msvc --linkopt=/WX --host_linkopt=/WX # Treat warnings as errors...
# ...but disable the ones that are violated.
# build:msvc --linkopt=/IGNORE:4001 --host_linkopt=/IGNORE:4001 # no object files
build:release --copt=-DNDEBUG
build:release --copt=-Os
build:release --copt=-fno-unroll-loops
build:debug -c dbg
build:debug --copt=-g
build:debug --strip=never
build:debug --copt=-UNDEBUG
build:debug --copt=-O0
build:debug --features=asan
# build:debug --features=ubsan
build:debug --spawn_strategy=standalone
build:debug --apple_enable_auto_dsym_dbg
build:debug --apple_generate_dsym
# ## SEE https://github.com/RobotLocomotion/drake/tree/master/tools/dynamic_analysis
# Configuration for generating
build:coverage --repo_env=CC=clang
build:coverage --cxxopt=-std=c++17
build:coverage --host_cxxopt=-std=c++17
build:coverage --test_env=VERBOSE_COVERAGE=1
build:coverage --test_env=GCOV_PREFIX_STRIP=10
build:coverage --test_output=all
build:coverage --nocache_test_results
build:coverage --combined_report=lcov
# To manually set the target CPU, use
# build --apple_platform_type=macos
# build --cpu=darwin_arm64 --host_cpu=darwin_arm64
# build --apple_platform_type=macos
# build --cpu=darwin_x86_64 --host_cpu=darwin_x86_64
# Tries to import additional config
try-import %workspace%/.bazelrc.configure
try-import %workspace%/.bazelrc.user