-
Notifications
You must be signed in to change notification settings - Fork 77
/
Copy path.bazelrc
52 lines (46 loc) · 1.74 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
common --action_env=BAZEL_CXXOPTS=-std=c++17
common --cxxopt='-std=c++17'
common --copt=-fdiagnostics-color=always
common --test_output=errors
# compilation_mode options below are `dbg` (debug symbols) `fastbuild`
# (build as quickly as possible), and `opt` (turn on all optimizations)
common -c dbg
common --enable_bzlmod
# required for hybrid bzlmod+workspace builds
common --enable_workspace
# prevents changes to PATH from causing a full rebuild
common --incompatible_strict_action_env
# compile with clang on all platforms
build --action_env=CC=clang
build --action_env=CXX=clang++
build --host_action_env=CC=clang
build --host_action_env=CXX=clang++
# linux-specific options
build:linux --linkopt="-fuse-ld=lld"
# macos specific options
build:macos --apple_platform_type=macos
build:macos --macos_minimum_os=10.15
build:macos --macos_sdk_version=10.15
# https://github.com/bazelbuild/apple_support
build:macos --apple_crosstool_top=@local_config_apple_cc//:toolchain
build:macos --crosstool_top=@local_config_apple_cc//:toolchain
build:macos --host_crosstool_top=@local_config_apple_cc//:toolchain
# Avoid hitting command line argument limit
build:macos --features=archive_param_file
# MacOS arm64 config
build:macos_arm64 --cpu=darwin_arm64
build:macos_arm64 --macos_minimum_os=11.0
# run with --config=gcc to force use of gcc
# (and the default linker, usually ld) instead
build:gcc --action_env=CC=gcc
build:gcc --action_env=CXX=g++
build:gcc --host_action_env=CC=gcc
build:gcc --host_action_env=CXX=g++
# run with --config=asan to enable
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