Use -O2 option when compiling with MSVC
authorPascal Quantin <pascal.quantin@gmail.com>
Wed, 4 Jun 2014 14:27:44 +0000 (16:27 +0200)
committerAnders Broman <a.broman58@gmail.com>
Wed, 4 Jun 2014 14:55:40 +0000 (14:55 +0000)
Change-Id: Ia2c14b782b1a73ecab41c25ed21e4fcf356f5ee3
Reviewed-on: https://code.wireshark.org/review/1948
Reviewed-by: Anders Broman <a.broman58@gmail.com>
config.nmake

index 4843ea956fcc6a3687a43045027040ed52f14b50..66b48857492f48e999db925e7c2da770f29d24c7 100644 (file)
@@ -994,13 +994,16 @@ APPVER=5.02
 #                                   This definition prevents the complaint about the redefinition of inline by WinPCap
 #                                   in pcap-stdinc.h when compiling CPP files, e.g. the QT UI
 #
-# -Ox                               http://msdn.microsoft.com/en-us/library/59a3b321.aspx
-#                                   Specifying the /Ox compiler option is the same as using the following options:
+# -O2                               http://msdn.microsoft.com/en-us/library/8f8h5cxt.aspx
+#                                   Specifying the /O2 compiler option is the same as using the following options:
 #                                   /Ob (Inline Function Expansion), where the option parameter is 2 (/Ob2)
 #                                   /Og (Global Optimizations)
 #                                   /Oi (Generate Intrinsic Functions)
 #                                   /Ot (Favor Fast Code)
 #                                   /Oy (Frame-Pointer Omission)
+#                                   /Gs (Buffer Security Check)
+#                                   /GF (Eliminate Duplicate Strings)
+#                                   /Gy (Enable Function-Level Linking)
 
 ##Note: LOCAL_CFLAGS are flags used for *all* compilations
 ##      STANDARD_CFLAGS (see below) are flags used just for *Wireshark* compilations
@@ -1015,7 +1018,7 @@ APPVER=5.02
         "$(MSVC_VARIANT)" == "MSVC2012EE" || \
         "$(MSVC_VARIANT)" == "MSVC2013"   || \
         "$(MSVC_VARIANT)" == "MSVC2013EE"
-LOCAL_CFLAGS=/Zi /W3 /MD /Ox /DWIN32_LEAN_AND_MEAN /DMSC_VER_REQUIRED=$(MSC_VER_REQUIRED) \
+LOCAL_CFLAGS=/Zi /W3 /MD /O2 /DWIN32_LEAN_AND_MEAN /DMSC_VER_REQUIRED=$(MSC_VER_REQUIRED) \
             /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE -DPSAPI_VERSION=1
 
 !IF "$(MSVC_VARIANT)" == "MSVC2012"   || \