From a4c306185b2355972ea72a9d16d6d86ff18097c6 Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Wed, 4 Jun 2014 16:27:44 +0200 Subject: [PATCH] Use -O2 option when compiling with MSVC Change-Id: Ia2c14b782b1a73ecab41c25ed21e4fcf356f5ee3 Reviewed-on: https://code.wireshark.org/review/1948 Reviewed-by: Anders Broman --- config.nmake | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/config.nmake b/config.nmake index 4843ea956f..66b4885749 100644 --- a/config.nmake +++ b/config.nmake @@ -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" || \