summaryrefslogtreecommitdiff
path: root/patches/msvcc-warning
blob: 876fe1bdc5a5418e2849b4a95a9936a231da0255 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Index: libffi/msvcc.sh
===================================================================
--- libffi.orig/msvcc.sh
+++ libffi/msvcc.sh
@@ -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"
@@ -65,13 +65,25 @@ do
       ml="ml64" # "$MSVC/x86_amd64/ml64"
       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 +120,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)
Index: libffi/ChangeLog
===================================================================
--- libffi.orig/ChangeLog
+++ libffi/ChangeLog
@@ -309,6 +309,11 @@
 	* man/Makefile.in: Regenerate.
 	* testsuite/Makefile.in: Regenerate.
 
+2010-03-30  Dan Witte  <dwitte@mozilla.com>
+
+	* msvcc.sh: Disable build warnings.
+	* README (tested): Clarify windows build procedure.
+
 2010-03-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
 	* configure.ac (libffi_cv_as_x86_64_unwind_section_type): New test.