diff options
author | Dan Gudmundsson <[email protected]> | 2015-09-28 12:34:53 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2015-10-22 14:17:57 +0200 |
commit | 4a9f688b804688ff95e256d3412ca932b9972d8a (patch) | |
tree | e3691d22889979a0c5835ab5ca4ef0efb198f73f /erts/etc/win32/msys_tools/vc/cc.sh | |
parent | 1523be48ab4071b158412f4b06fe9c8d6ba3e73c (diff) | |
download | otp-4a9f688b804688ff95e256d3412ca932b9972d8a.tar.gz otp-4a9f688b804688ff95e256d3412ca932b9972d8a.tar.bz2 otp-4a9f688b804688ff95e256d3412ca932b9972d8a.zip |
erts: Detect and build on MSYS2 for windows
Allow building win32 on MSYS2.
Avoid msys2 path conversion which does not work.
And print the real windows command when something fails.
Diffstat (limited to 'erts/etc/win32/msys_tools/vc/cc.sh')
-rw-r--r-- | erts/etc/win32/msys_tools/vc/cc.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/erts/etc/win32/msys_tools/vc/cc.sh b/erts/etc/win32/msys_tools/vc/cc.sh index ad05e5375b..ac89aac34e 100644 --- a/erts/etc/win32/msys_tools/vc/cc.sh +++ b/erts/etc/win32/msys_tools/vc/cc.sh @@ -242,7 +242,7 @@ for x in $SOURCES; do if [ $PREPROCESSING = true ]; then output_flag="-E" else - output_flag="-c -Fo`cmd //C echo ${output_filename}`" + output_flag="-FS -c -Fo`cmd //C echo ${output_filename}`" fi params="$COMMON_CFLAGS $MD $DEBUG_FLAGS $OPTIMIZE_FLAGS \ $CMD ${output_flag} $MPATH" @@ -250,6 +250,8 @@ for x in $SOURCES; do echo cc.sh "$SAVE" >>$CC_SH_DEBUG_LOG echo cl.exe $params >>$CC_SH_DEBUG_LOG fi + # MSYS2 (currently) converts the paths wrong, avoid it + export MSYS2_ARG_CONV_EXCL=-FoC eval cl.exe $params >$MSG_FILE 2>$ERR_FILE RES=$? if test $PREPROCESSING = false; then @@ -274,6 +276,7 @@ for x in $SOURCES; do fi rm -f $ERR_FILE $MSG_FILE if [ $RES != 0 ]; then + echo Failed: cl.exe $params rm -rf $TMPOBJDIR exit $RES fi @@ -312,7 +315,10 @@ if [ $LINKING = true ]; then stdlib="-lLIBMTD";; esac # And finally call the next script to do the linking... - params="$out_spec $LINKCMD $stdlib" + params="$out_spec $LINKCMD $stdlib" + if [ "X$CC_SH_DEBUG_LOG" != "X" ]; then + echo ld.sh $ACCUM_OBJECTS $params + fi eval ld.sh $ACCUM_OBJECTS $params RES=$? fi |