From 03abafce3dd55309fd6cc054ed19bb79da453da2 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Sun, 14 Dec 2014 14:59:16 -0500 Subject: [PATCH 1/2] Change /d2Zi+ flag on msvc builds to /Zo. http://msdn.microsoft.com/en-us/library/dn785163.aspx --- AMBuildScript | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/AMBuildScript b/AMBuildScript index 580b0807..fe92d4fd 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -256,9 +256,7 @@ class SMConfig(object): if builder.options.debug == '1': cxx.defines += ['DEBUG', '_DEBUG'] if cxx.like('msvc'): - cxx.cflags += ['/Od', '/RTC1'] - if cxx.version >= 1600: - cxx.cflags += ['/d2Zi+'] + cxx.cflags += ['/Od', '/Zo', '/RTC1'] # This needs to be after our optimization flags which could otherwise disable it. if cxx.vendor == 'msvc': From 7e8473b61a7f0cb1ace14c000c94ce7e67577ef7 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Sun, 14 Dec 2014 16:03:42 -0500 Subject: [PATCH 2/2] Remove /Zo on debug builds and add on release builds. --- AMBuildScript | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AMBuildScript b/AMBuildScript index fe92d4fd..d2b99d54 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -249,14 +249,14 @@ class SMConfig(object): if cxx.like('gcc'): cxx.cflags += ['-O3'] elif cxx.like('msvc'): - cxx.cflags += ['/Ox'] + cxx.cflags += ['/Ox', '/Zo'] cxx.linkflags += ['/OPT:ICF', '/OPT:REF'] # Debugging if builder.options.debug == '1': cxx.defines += ['DEBUG', '_DEBUG'] if cxx.like('msvc'): - cxx.cflags += ['/Od', '/Zo', '/RTC1'] + cxx.cflags += ['/Od', '/RTC1'] # This needs to be after our optimization flags which could otherwise disable it. if cxx.vendor == 'msvc':