Commit 19599937 by Derek Mauro Committed by Copybara-Service

Update Windows and MacOS CI builds to Bazel 7.0.0

This changes the way in which clang-cl is selected on Windows
as it has changed:
https://bazel.build/configure/windows#clang

--features=external_include_paths has been removed from Windows builds
since it appears cause build command errors currently
PiperOrigin-RevId: 596965732
Change-Id: I95b636a9a4fdcc4172c3bb8c6cb28d5f7db592c9
parent 6d21df71
......@@ -68,6 +68,17 @@ config_setting(
visibility = [":__subpackages__"],
)
# x64_windows-clang-cl - used for selecting clang-cl for CI builds
platform(
name = "x64_windows-clang-cl",
constraint_values = [
"@platforms//cpu:x86_64",
"@platforms//os:windows",
"@bazel_tools//tools/cpp:clang-cl",
],
visibility = [":__subpackages__"],
)
config_setting(
name = "osx",
constraint_values = [
......
......@@ -24,7 +24,7 @@ if [[ -z ${ABSEIL_ROOT:-} ]]; then
fi
# If we are running on Kokoro, check for a versioned Bazel binary.
KOKORO_GFILE_BAZEL_BIN="bazel-5.1.1-darwin-x86_64"
KOKORO_GFILE_BAZEL_BIN="bazel-7.0.0-darwin-x86_64"
if [[ ${KOKORO_GFILE_DIR:-} ]] && [[ -f ${KOKORO_GFILE_DIR}/${KOKORO_GFILE_BAZEL_BIN} ]]; then
BAZEL_BIN="${KOKORO_GFILE_DIR}/${KOKORO_GFILE_BAZEL_BIN}"
chmod +x ${BAZEL_BIN}
......@@ -56,6 +56,7 @@ ${BAZEL_BIN} test ... \
--copt="-DGTEST_REMOVE_LEGACY_TEST_CASEAPI_=1" \
--copt="-Werror" \
--cxxopt="-std=c++14" \
--enable_bzlmod=false \
--features=external_include_paths \
--keep_going \
--show_timestamps \
......
......@@ -39,7 +39,7 @@ IF NOT "%ALTERNATE_OPTIONS%"=="" copy %ALTERNATE_OPTIONS% absl\base\options.h
:: /google/data/rw/teams/absl/kokoro/windows.
::
:: TODO(absl-team): Remove -Wno-microsoft-cast
%KOKORO_GFILE_DIR%\bazel-5.1.1-windows-x86_64.exe ^
%KOKORO_GFILE_DIR%\bazel-7.0.0-windows-x86_64.exe ^
test ... ^
--compilation_mode=%COMPILATION_MODE% ^
--compiler=clang-cl ^
......@@ -48,7 +48,9 @@ IF NOT "%ALTERNATE_OPTIONS%"=="" copy %ALTERNATE_OPTIONS% absl\base\options.h
--copt=-Wno-microsoft-cast ^
--define=absl=1 ^
--distdir=%KOKORO_GFILE_DIR%\distdir ^
--features=external_include_paths ^
--enable_bzlmod=false ^
--extra_execution_platforms=//absl:x64_windows-clang-cl ^
--extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl ^
--keep_going ^
--test_env="GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1" ^
--test_env=TZDIR="%CD%\absl\time\internal\cctz\testdata\zoneinfo" ^
......
......@@ -34,14 +34,14 @@ IF NOT "%ALTERNATE_OPTIONS%"=="" copy %ALTERNATE_OPTIONS% absl\base\options.h
:: To upgrade Bazel, first download a new binary from
:: https://github.com/bazelbuild/bazel/releases and copy it to
:: /google/data/rw/teams/absl/kokoro/windows.
%KOKORO_GFILE_DIR%\bazel-5.1.1-windows-x86_64.exe ^
%KOKORO_GFILE_DIR%\bazel-7.0.0-windows-x86_64.exe ^
test ... ^
--compilation_mode=%COMPILATION_MODE% ^
--copt=/WX ^
--copt=/std:%STD% ^
--define=absl=1 ^
--distdir=%KOKORO_GFILE_DIR%\distdir ^
--features=external_include_paths ^
--enable_bzlmod=false ^
--keep_going ^
--test_env="GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1" ^
--test_env=TZDIR="%CD%\absl\time\internal\cctz\testdata\zoneinfo" ^
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment