aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorGravatar Dmitry Lomov <dslomov@google.com>2015-08-11 16:44:21 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2015-08-12 15:22:10 +0000
commit78c0cc73d3fec13add33b3ac811748647d76b38f (patch)
tree71fdd959dec21ce52750b6fcf2a28f59733ab272 /scripts
parent3e791009408bcae7f52ba4ae84a14c6c2460fed1 (diff)
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
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bootstrap/compile.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/bootstrap/compile.sh b/scripts/bootstrap/compile.sh
index 62ff5bfddb..3db29f71c1 100755
--- a/scripts/bootstrap/compile.sh
+++ b/scripts/bootstrap/compile.sh
@@ -23,9 +23,11 @@ DIRS=$(echo src/{java_tools/singlejar/java/com/google/devtools/build/zip,main/ja
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.cc
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