Skip to content

Commit

Permalink
Run the Bazel bootstrap test in C++17 mode
Browse files Browse the repository at this point in the history
Most of Bazel code already builds in C++17 mode (bazelbuild@ba38aa2) but the bootstrap test does not. This causes failures on Windows if you try to use C++17 features, because the MSVC default version is too old.

PiperOrigin-RevId: 661142299
Change-Id: Ifb1f50bb904fb08c6aaae017c595d0b23264ea12
  • Loading branch information
Googler authored and copybara-github committed Aug 9, 2024
1 parent c2d587a commit 51b7317
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ if [[ $PLATFORM == "darwin" ]] && \
EXTRA_BAZEL_ARGS="${EXTRA_BAZEL_ARGS-} --define IPHONE_SDK=1"
fi

if [[ $PLATFORM == "windows" ]]; then
EXTRA_BAZEL_ARGS="${EXTRA_BAZEL_ARGS-} --cxxopt=/std:c++17 --host_cxxopt=/std:c++17"
fi

source scripts/bootstrap/bootstrap.sh

new_step 'Building Bazel with Bazel'
Expand Down

0 comments on commit 51b7317

Please sign in to comment.