Avoid command line argument mangling on Windows.
exec(3) under mingw converts every command line argument that looks like Unix path
into Windows path when executing non-mingw images (criteria for non-mingw image is
that the image does not depend on msys-<version>.dll). This affects bazel labels
(`//foo:bar` becomes `/foo:bar` for example).
This CL:
1) Replaces usage of execv(3) with Windows-native CreateProcess.
2) Converts all command line arguments that are indeed paths into Windows paths.
--
MOS_MIGRATED_REVID=100386350
diff --git a/scripts/bootstrap/compile.sh b/scripts/bootstrap/compile.sh
index 62ff5bf..3db29f7 100755
--- a/scripts/bootstrap/compile.sh
+++ b/scripts/bootstrap/compile.sh
@@ -23,9 +23,11 @@
case "${PLATFORM}" in
msys*|mingw*)
BLAZE_UTIL_SUFFIX=mingw
+ BLAZE_UTIL_POSIX=""
;;
*)
BLAZE_UTIL_SUFFIX="${PLATFORM}"
+ BLAZE_UTIL_POSIX="src/main/cpp/blaze_util_posix.cc"
;;
esac
@@ -34,6 +36,7 @@
src/main/cpp/blaze_startup_options_common.cc
src/main/cpp/blaze_util.cc
src/main/cpp/blaze_util_${BLAZE_UTIL_SUFFIX}.cc
+${BLAZE_UTIL_POSIX}
src/main/cpp/blaze.cc
src/main/cpp/option_processor.cc
src/main/cpp/util/errors.cc