summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-06-11 10:48:37 +0200
committerThiago Macieira <thiago.macieira@intel.com>2014-07-07 03:52:47 +0200
commit9f0e5d00ab51cc7c0dc87c8d72f48c4e6edaf120 (patch)
tree96db0050ac84686126e69df2b76fdc12f23f6807 /mkspecs
parent9eceb21d62b4bff779144946074b132408766677 (diff)
Enforce strict string literal behaviors with MSVC 2013
MSVC 2013 implements the behavior mandated by C++11 that removes the ability to downconvert a string literal to a modifiable char*, but it's not enabled by default. This option turns it on. It's only enabled for release builds because the compiler page has a note saying the Standard Library has bugs that prevent it from working in debug mode. See http://msdn.microsoft.com/en-us/library/dn449508.aspx Visual Studio "14" has this fixed. [ChangeLog][Compiler Specific Changes] Release builds with Microsoft Visual Studio 2013 now enable the standard-conforming C and C++ strict string behavior. This option will be enabled in all builds with future Visual Studio versions. Non-conforming code should be fixed for maximum portability and correctness. See http://msdn.microsoft.com/en-us/library/dn449508.aspx for more information. Change-Id: If5ba6cc8456209b268e047d1010710fe332b8312 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/win32-msvc2013/qmake.conf4
1 files changed, 2 insertions, 2 deletions
diff --git a/mkspecs/win32-msvc2013/qmake.conf b/mkspecs/win32-msvc2013/qmake.conf
index 6e0bd0b214..535904a8f9 100644
--- a/mkspecs/win32-msvc2013/qmake.conf
+++ b/mkspecs/win32-msvc2013/qmake.conf
@@ -25,8 +25,8 @@ QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t -FS
QMAKE_CFLAGS_WARN_ON = -W3
QMAKE_CFLAGS_WARN_OFF = -W0
-QMAKE_CFLAGS_RELEASE = -O2 -MD
-QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi
+QMAKE_CFLAGS_RELEASE = -O2 -MD -Zc:strictStrings
+QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi -Zc:strictStrings
QMAKE_CFLAGS_DEBUG = -Zi -MDd
QMAKE_CFLAGS_YACC =
QMAKE_CFLAGS_LTCG = -GL