summaryrefslogtreecommitdiff
path: root/msvcc.sh
diff options
context:
space:
mode:
authorPaul Monson <paulmon@users.noreply.github.com>2019-04-26 04:58:58 -0700
committerAnthony Green <green@moxielogic.com>2019-04-26 07:58:58 -0400
commitdb5706ff285c476aa3c0f811ff2b188319ac3ebe (patch)
treed9c85a3b029aadc52d8fcda64f783b8d5ebf2d28 /msvcc.sh
parentd1e9b4b96cc8d237c3532cf83da0d4b99d19abb5 (diff)
downloadlibffi-db5706ff285c476aa3c0f811ff2b188319ac3ebe.tar.gz
add support for 32-bit ARM on Windows (#477)
* add support for 32-bit ARM on Windows * fix mismatched brace in appveyor.yml * remove arm platform from appveyor.yml for now * fix arm build * fix typo * fix assembler names * try Visual Studio 2017 * add windows arm32 to .appveyor.yml * update README.md
Diffstat (limited to 'msvcc.sh')
-rwxr-xr-xmsvcc.sh18
1 files changed, 16 insertions, 2 deletions
diff --git a/msvcc.sh b/msvcc.sh
index 9a252f8..9c52f52 100755
--- a/msvcc.sh
+++ b/msvcc.sh
@@ -60,7 +60,7 @@ do
case $1
in
--verbose)
- $verbose=1
+ verbose=1
shift 1
;;
--version)
@@ -80,6 +80,11 @@ do
safeseh=
shift 1
;;
+ -marm)
+ ml='armasm'
+ safeseh=
+ shift 1
+ ;;
-clang-cl)
cl="clang-cl"
shift 1
@@ -237,6 +242,7 @@ do
else
output="-Fe$2"
fi
+ armasm_output="-o $2"
if [ -n "$assembly" ]; then
args="$args $output"
else
@@ -289,13 +295,21 @@ if [ -n "$assembly" ]; then
fi
ppsrc="$outdir/$(basename $src|sed 's/.S$/.asm/g')"
+ if [ $ml = "armasm" ]; then
+ defines="$defines -D_M_ARM"
+ fi
+
if test -n "$verbose"; then
echo "$cl -nologo -EP $includes $defines $src > $ppsrc"
fi
"$cl" -nologo -EP $includes $defines $src > $ppsrc || exit $?
output="$(echo $output | sed 's%/F[dpa][^ ]*%%g')"
- args="-nologo $safeseh $single $output $ppsrc"
+ if [ $ml = "armasm" ]; then
+ args="-nologo -g -oldit $armasm_output $ppsrc -errorReport:prompt"
+ else
+ args="-nologo $safeseh $single $output $ppsrc"
+ fi
if test -n "$verbose"; then
echo "$ml $args"