diff options
author | Anthony Green <green@moxielogic.com> | 2010-08-05 14:56:53 -0400 |
---|---|---|
committer | Anthony Green <green@moxielogic.com> | 2010-08-05 14:56:53 -0400 |
commit | 00d0b59cd13f89ab8b44bd894eb7f0a131fcb472 (patch) | |
tree | 884a68e9b40039cf322e62b7abb6cf4ed4e49ecf /msvcc.sh | |
parent | bda487e87064f27965155459a62dc52a744778d0 (diff) | |
download | libffi-00d0b59cd13f89ab8b44bd894eb7f0a131fcb472.tar.gz |
Fix debug build for windows
Diffstat (limited to 'msvcc.sh')
-rwxr-xr-x | msvcc.sh | 24 |
1 files changed, 18 insertions, 6 deletions
@@ -42,7 +42,7 @@ # format and translated into something sensible for cl or ml. # -args="-nologo" +args="-nologo -W3" md=-MD cl="cl" ml="ml" @@ -67,13 +67,25 @@ do 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 ;; @@ -110,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) |