forked from robinlinden/hastur
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bazelrc
92 lines (73 loc) · 3.88 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
87
88
89
90
91
92
# Bazel configuration
# =========================================================
build --enable_platform_specific_config
coverage --combined_report=lcov
test --test_output=errors
test --test_summary=terse
test --test_verbose_timeout_warnings
# Bazel deprecations
# =========================================================
# See: https://docs.bazel.build/versions/main/backward-compatibility.html
build --incompatible_disallow_empty_glob
build --incompatible_enable_cc_toolchain_resolution
# Compiler configuration
# =========================================================
# Bazel + Clang supports this really cool features where it checks that you're
# not relying on transitive dependencies, so let's enable that!
build:linux --features=layering_check
build:linux --cxxopt='-std=c++2b'
build:linux --cxxopt='-fno-rtti'
# Force DWARF-4 format for debug symbols for compatibility with valgrind.
# See: https://bugs.kde.org/show_bug.cgi?id=452758
build:linux --copt='-gdwarf-4'
build:windows --enable_runfiles
build:windows --cxxopt='/std:c++latest'
build:windows --cxxopt='/GR-' # Disable rtti.
build:windows --copt='/permissive-' # Conform to the standard.
build:windows --copt='/Zc:__cplusplus' # Report the real supported C++ version, not just C++98.
# Special build options
# =========================================================
# https://bazel.build/docs/windows#clang
build:clang-cl --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl
build:clang-cl --extra_execution_platforms=//:x64_windows-clang-cl
build:clang-cl --platforms=//:x64_windows-clang-cl
build:libc++ --cxxopt=-stdlib=libc++
build:libc++ --cxxopt=-fexperimental-library
build:libc++ --linkopt=-stdlib=libc++
build:libc++ --copt=-D_LIBCPP_ENABLE_NODISCARD
# https://releases.llvm.org/15.0.0/projects/libcxx/docs/ReleaseNotes.html#upcoming-deprecations-and-removals
build:libc++ --copt=-D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES
# Some of this is from "Can I run AddressSanitizer with more aggressive diagnostics enabled?"
# on https://github.com/google/sanitizers/wiki/AddressSanitizer#faq and some is from
# https://chromium.googlesource.com/external/github.com/grpc/grpc/+/4e9206f48c91e17f43856b016b12f59dd5118293/tools/bazel.rc
build:asan --strip=never
build:asan --copt=-fsanitize=address
build:asan --copt=-fsanitize-address-use-after-scope
build:asan --copt=-fno-omit-frame-pointer
build:asan --linkopt=-fsanitize=address
build:asan --action_env=ASAN_OPTIONS=detect_leaks=1:strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1
build:asan --action_env=LSAN_OPTIONS=report_objects=1
build:tsan --strip=never
build:tsan --copt=-fsanitize=thread
build:tsan --linkopt=-fsanitize=thread
build:ubsan --strip=never
build:ubsan --copt=-fsanitize=undefined
build:ubsan --copt=-fno-omit-frame-pointer
build:ubsan --linkopt=-fsanitize=undefined
build:ubsan --linkopt=-fsanitize-link-c++-runtime
build:ubsan --action_env=UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1
build:clang14-coverage --action_env=BAZEL_LLVM_COV=llvm-cov-14
build:clang14-coverage --action_env=BAZEL_USE_LLVM_NATIVE_COVERAGE=1
build:clang14-coverage --action_env=GCOV=llvm-profdata-14
build:clang14-coverage --experimental_generate_llvm_lcov
build:asan-libfuzzer --config=asan
build:asan-libfuzzer --@rules_fuzzing//fuzzing:cc_engine=@rules_fuzzing//fuzzing/engines:libfuzzer
build:asan-libfuzzer --@rules_fuzzing//fuzzing:cc_engine_instrumentation=libfuzzer
build:asan-libfuzzer --@rules_fuzzing//fuzzing:cc_engine_sanitizer=asan
build:asan-honggfuzz --config=asan
build:asan-honggfuzz --@rules_fuzzing//fuzzing:cc_engine=@rules_fuzzing//fuzzing/engines:honggfuzz
build:asan-honggfuzz --@rules_fuzzing//fuzzing:cc_engine_instrumentation=honggfuzz
build:asan-honggfuzz --@rules_fuzzing//fuzzing:cc_engine_sanitizer=asan
# Misc configuration
# =========================================================
try-import %workspace%/.bazelrc.local