forked from proxy-wasm/proxy-wasm-cpp-host
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.bazelrc
More file actions
90 lines (74 loc) · 3.91 KB
/
.bazelrc
File metadata and controls
90 lines (74 loc) · 3.91 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
78
79
80
81
82
83
84
85
86
87
88
89
90
# Disable Bzlmod
common --noenable_bzlmod
# Pass CC, CXX and PATH from the environment.
build --action_env=CC
build --action_env=CXX
build --action_env=PATH
# Use Clang compiler.
build:clang --action_env=BAZEL_COMPILER=clang
build:clang --action_env=CC=clang
build:clang --action_env=CXX=clang++
build:clang --copt -Wno-pragma-once-outside-header --cxxopt -Wno-pragma-once-outside-header
# 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 Address and Undefined Behavior Sanitizers (strict version).
build:clang-asan-strict --config=clang-asan
build:clang-asan-strict --copt -fsanitize=integer,local-bounds,nullability
build:clang-asan-strict --linkopt -fsanitize=integer,local-bounds,nullability
# Use Honggfuzz with Address and Undefined Behavior Sanitizers (strict version).
build:clang-asan-honggfuzz --config=clang-asan-strict
build:clang-asan-honggfuzz --@rules_fuzzing//fuzzing:cc_engine=@rules_fuzzing//fuzzing/engines:honggfuzz
build:clang-asan-honggfuzz --@rules_fuzzing//fuzzing:cc_engine_instrumentation=honggfuzz
# Use LibFuzzer with Address and Undefined Behavior Sanitizers (strict version).
build:clang-asan-libfuzzer --config=clang-asan-strict
build:clang-asan-libfuzzer --@rules_fuzzing//fuzzing:cc_engine=@rules_fuzzing//fuzzing/engines:libfuzzer
build:clang-asan-libfuzzer --@rules_fuzzing//fuzzing:cc_engine_instrumentation=libfuzzer
# 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
build:clang-tsan --test_env=TSAN_OPTIONS=suppressions=bazel/tsan_suppressions.txt
# Use Clang-Tidy tool.
build:clang-tidy --config=clang
build:clang-tidy --aspects @bazel_clang_tidy//clang_tidy:clang_tidy.bzl%clang_tidy_aspect
build:clang-tidy --@bazel_clang_tidy//:clang_tidy_config=@proxy_wasm_cpp_host//:clang_tidy_config
build:clang-tidy --output_groups=report
# Use GCC compiler.
build:gcc --action_env=BAZEL_COMPILER=gcc
build:gcc --action_env=CC=gcc
build:gcc --action_env=CXX=g++
build:hermetic-llvm --incompatible_enable_cc_toolchain_resolution
build:hermetic-llvm --action_env BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
build:hermetic-llvm --extra_toolchains @emsdk//emscripten_toolchain:cc-toolchain-wasm
build:hermetic-llvm-macos --config=hermetic-llvm
# Below flags mitigate https://github.com/bazel-contrib/toolchains_llvm/pull/229.
build:hermetic-llvm-macos --features=-libtool
build:hermetic-llvm-macos --features=-supports_dynamic_linker
build --enable_platform_specific_config
# Use C++20.
build:linux --cxxopt=-std=c++20 --host_cxxopt=-std=c++20
build:macos --cxxopt=-std=c++20 --host_cxxopt=-std=c++20
build:windows --cxxopt="/std:c++20" --host_cxxopt="/std:c++20"
# Enable symlinks and runfiles on Windows (enabled by default on other platforms).
startup --windows_enable_symlinks
build:windows --enable_runfiles