-
Notifications
You must be signed in to change notification settings - Fork 139
/
.bazelrc
50 lines (39 loc) · 2.32 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
# https://github.com/bazelbuild/stardoc/issues/112
common --incompatible_allow_tags_propagation
# Fail if a glob doesn't match anything (https://github.com/bazelbuild/bazel/issues/8195)
build --incompatible_disallow_empty_glob
build --host_macos_minimum_os=13.0
build --macos_minimum_os=13.0
# We don't need to bump some of our dependencies, just becuse our dev
# dependencies cause us to use a newer version
build --check_direct_dependencies=off
# This is needed for Bazel 6 compatibility.
# It's enabled (and can't be disabled) in Bazel 7.
# TODO: Remove this once we drop Bazel 6 support.
# See also: https://github.com/bazelbuild/bazel/issues/14327
build --experimental_enable_aspect_hints
# Make sure no warnings slip into the C++ tools we vendor
build --features treat_warnings_as_errors
# The default strategy is worker, which has sandboxing disabled by default,
# which can hide issues with non-hermetic bugs.
build --worker_sandboxing
build --enable_platform_specific_config
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
# TODO: Remove once https://github.com/protocolbuffers/protobuf/commit/7bb756c1cc580380c689a9141b27e20c7a5d95f3 is in a release
build --per_file_copt="external/.*protobuf.*/src/google/protobuf/stubs/strutil.cc@-Wno-deprecated-declarations"
# TODO: Use --host_per_file_copt here once we drop bazel 5.x
build --host_cxxopt="-Wno-deprecated-declarations"
# TODO: Remove once https://github.com/protocolbuffers/protobuf/commit/85225b83c3386a282bf1e51f1be8bd2ad0bc45d0 is in a release
build --per_file_copt="external/.*protobuf.*/.*.cc@-Wno-unused-function"
# TODO: Use --host_per_file_copt here once we drop bazel 5.x
build --host_cxxopt="-Wno-unused-function"
# The CNIOBoringSSL library uses C++14 features like 'enable_if_t' macro support.
# For more details on how to enable this in Bazel:
# https://stackoverflow.com/questions/40260242/how-to-set-c-standard-version-when-build-with-bazel/43388168#43388168
build:linux --cxxopt='-std=c++14'
# This C2K warning causes zlib to fail to compile.
# There is an open issue about it on the zlib repository here:
# https://github.com/madler/zlib/issues/633
build --per_file_copt="external/.*zlib.*/.*.c@-Wno-deprecated-non-prototype"