Skip to content

Commit 6440ed6

Browse files
committed
chore: set -std=c++17 for macos & windows builds
Recent versions of googletest require C++17 to compile.
1 parent 2852b69 commit 6440ed6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.bazelrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ build --features=layering_check
2828
build:macos --apple_crosstool_top=@local_config_apple_cc//:toolchain
2929
build:macos --crosstool_top=@local_config_apple_cc//:toolchain
3030
build:macos --host_crosstool_top=@local_config_apple_cc//:toolchain
31+
build:macos --cxxopt=-std=c++17
32+
build:macos --host_cxxopt=-std=c++17
3133

3234
# Java
3335
# Always build for Java 8, even with a newer JDK. This ensures that all artifacts we release are
@@ -66,6 +68,8 @@ build --android_platforms=//:android_arm64
6668
build:windows --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl
6769
build:windows --extra_execution_platforms=//bazel/platforms:x64_windows-clang-cl
6870
build:windows --features=static_link_msvcrt
71+
build:windows --cxxopt=/std:c++17
72+
build:windows --host_cxxopt=/std:c++17
6973
# Required as PATH doubles as the shared library search path on Windows and the
7074
# Java agent functionality depends on system-provided shared libraries.
7175
test:windows --noincompatible_strict_action_env

0 commit comments

Comments
 (0)