-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy path.bazelrc
More file actions
77 lines (64 loc) · 2.9 KB
/
.bazelrc
File metadata and controls
77 lines (64 loc) · 2.9 KB
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
# NOTE: this workspace Bazel config was copied from proxy-wasm-cpp-host and
# edited to choose some sensible defaults. Consider moving copts and
# linkopts into BUILD rules upstream.
# Disable Bzlmod
common --noenable_bzlmod
# Default engine to execute when running bazel build/test. This engine can
# be overridden by specifying a different engine on the command line:
# `bazel test //... --define engine=wasmtime` for example.
build --define engine=v8
# For unit testing, remove randomness from BoringSSL.
# This doesn't capture 'bazel run' test invocations. Oh well.
test --per_file_copt=external/boringssl/.*@-DBORINGSSL_UNSAFE_DETERMINISTIC_MODE=1
# For benchmarking, set specific build options.
build:bench --compilation_mode opt
build:bench --dynamic_mode=off
build:bench --copt -g1 # equals -gmlt in clang
build:bench --per_file_copt=external/boringssl/.*@-DBORINGSSL_UNSAFE_DETERMINISTIC_MODE=1
# Pass CC, CXX, LLVM_CONFIG from the environment.
build --action_env=CC
build --action_env=CXX
build --action_env=LLVM_CONFIG
# Force Clang.
build:clang --action_env=BAZEL_COMPILER=clang
build:clang --action_env=CC=clang
build:clang --action_env=CXX=clang++
# Force GCC.
build:gcc --action_env=BAZEL_COMPILER=gcc
build:gcc --action_env=CC=gcc
build:gcc --action_env=CXX=g++
# Common flags for Clang sanitizers.
build:clang-xsan --config=clang
build:clang-xsan --copt -O1
build:clang-xsan --copt -fno-omit-frame-pointer
build:clang-xsan --copt -fno-optimize-sibling-calls
build:clang-xsan --copt -fno-sanitize-recover=all
build:clang-xsan --linkopt -fsanitize-link-c++-runtime
build:clang-xsan --linkopt -fuse-ld=lld
build:clang-xsan --linkopt -rtlib=compiler-rt
build:clang-xsan --linkopt --unwindlib=libgcc
# Use Clang compiler with Address and Undefined Behavior Sanitizers.
build:clang-asan --config=clang-xsan
build:clang-asan --copt -DADDRESS_SANITIZER=1
build:clang-asan --copt -DUNDEFINED_SANITIZER=1
build:clang-asan --copt -fsanitize=address,undefined
build:clang-asan --copt -fsanitize-address-use-after-scope
build:clang-asan --linkopt -fsanitize=address,undefined
build:clang-asan --linkopt -fsanitize-address-use-after-scope
build:clang-asan --test_env=ASAN_OPTIONS=check_initialization_order=1:detect_stack_use_after_return=1:strict_init_order=1:strict_string_checks=1
build:clang-asan --test_env=UBSAN_OPTIONS=print_stacktrace=1
build:clang-asan --test_env=ASAN_SYMBOLIZER_PATH
# Use Clang compiler with Thread Sanitizer.
build:clang-tsan --config=clang-xsan
build:clang-tsan --copt -DTHREAD_SANITIZER=1
build:clang-tsan --copt -fsanitize=thread
build:clang-tsan --linkopt -fsanitize=thread
# Set per-platform flags (used below).
build --enable_platform_specific_config
# Use C++17.
build:linux --cxxopt=-std=c++17
build:macos --cxxopt=-std=c++17
build:windows --cxxopt="/std:c++17"
# Enable symlinks and runfiles on Windows (enabled by default on other platforms).
startup --windows_enable_symlinks
build:windows --enable_runfiles