diff options
author | green <green@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-04 21:11:09 +0000 |
---|---|---|
committer | green <green@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-04 21:11:09 +0000 |
commit | f51aab02abe223469d9f39e4e46250b65fd18a8b (patch) | |
tree | 3289bacfc83a97eaf50f42a61d0b9a06f4c76e9c /libffi/msvcc.sh | |
parent | de3e3c185df5165793e9c0459732eb5c2bede7c5 (diff) | |
download | gcc-f51aab02abe223469d9f39e4e46250b65fd18a8b.tar.gz |
Merge upstream libffi
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184897 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi/msvcc.sh')
-rwxr-xr-x | libffi/msvcc.sh | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/libffi/msvcc.sh b/libffi/msvcc.sh index 551c73d9655..dcdbeab16ae 100755 --- a/libffi/msvcc.sh +++ b/libffi/msvcc.sh @@ -42,10 +42,11 @@ # format and translated into something sensible for cl or ml. # -args="-nologo" +args="-nologo -W3" md=-MD cl="cl" ml="ml" +safeseh="-safeseh" output= while [ $# -gt 0 ] @@ -63,15 +64,28 @@ do -m64) cl="cl" # "$MSVC/x86_amd64/cl" ml="ml64" # "$MSVC/x86_amd64/ml64" + safeseh= + shift 1 + ;; + -O0) + args="$args -Od" shift 1 ;; -O*) - args="$args $1" + # If we're optimizing, make sure we explicitly turn on some optimizations + # that are implicitly disabled by debug symbols (-Zi). + args="$args $1 -OPT:REF -OPT:ICF -INCREMENTAL:NO" shift 1 ;; -g) - # Can't specify -RTC1 or -Zi in opt. -Gy is ok. Use -OPT:REF? - args="$args -D_DEBUG -RTC1 -Zi" + # Enable debug symbol generation. + args="$args -Zi -DEBUG" + shift 1 + ;; + -DFFI_DEBUG) + # Link against debug CRT and enable runtime error checks. + args="$args -RTC1" + defines="$defines $1" md=-MDd shift 1 ;; @@ -108,8 +122,8 @@ do shift 1 ;; -Wall) - # -Wall on MSVC is overzealous. Use -W3 instead. - args="$args -W3" + # -Wall on MSVC is overzealous, and we already build with -W3. Nothing + # to do here. shift 1 ;; -Werror) @@ -164,7 +178,7 @@ if [ -n "$assembly" ]; then echo "$cl -nologo -EP $includes $defines $src > $ppsrc" "$cl" -nologo -EP $includes $defines $src > $ppsrc || exit $? output="$(echo $output | sed 's%/F[dpa][^ ]*%%g')" - args="-nologo -safeseh $single $output $ppsrc" + args="-nologo $safeseh $single $output $ppsrc" echo "$ml $args" eval "\"$ml\" $args" |