Make Bazel build with MSVC-default-toolchain Bazel
After this change, a msys bazel can be built with
a MSVC-default Bazel by adding --cpu=x64_windows_msys --host=x64_windows_msys
See https://github.com/bazelbuild/bazel/issues/2627
--
Change-Id: Iaa82bf4dd911c5740b98d3b2739dfccca6203f79
Reviewed-on: https://cr.bazel.build/9293
PiperOrigin-RevId: 149532274
MOS_MIGRATED_REVID=149532274
diff --git a/compile.sh b/compile.sh
index 67223e6..2b5c073 100755
--- a/compile.sh
+++ b/compile.sh
@@ -113,6 +113,12 @@
xcodebuild -showsdks 2> /dev/null | grep -q '\-sdk iphonesimulator'; then
EXTRA_BAZEL_ARGS="${EXTRA_BAZEL_ARGS-} --define IPHONE_SDK=1"
fi
+
+case "${PLATFORM}" in
+msys*|mingw*)
+ EXTRA_BAZEL_ARGS="${EXTRA_BAZEL_ARGS-} --cpu=x64_windows_msys --host_cpu=x64_windows_msys"
+esac
+
source scripts/bootstrap/bootstrap.sh
if [ $DO_COMPILE ]; then