diff options
author | Jocelyn Turcotte <jocelyn.turcotte@nokia.com> | 2010-06-15 14:44:17 +0200 |
---|---|---|
committer | Jocelyn Turcotte <jocelyn.turcotte@nokia.com> | 2010-06-16 13:42:03 +0200 |
commit | 73fa311f67b21c9b897de0196d3b8227f27d828f (patch) | |
tree | 1c0c6f0a76e543b2a631a6fd91cabfc56b35f2cc /qmake | |
parent | 5b5785bc564ccea9f6868d02be3d1080cb5039b9 (diff) |
qmake: Fix CONFIG += exceptions_off with the MSVC project generator.
cl.exe default exception handling (when not specified on the command
line) is to disable exceptions. In vcproj files however, if the
ExceptionHandling option is not specified, the default behavior is to
enable exceptions without SEH (/EHsh).
This patch makes sure that ExceptionHandling is disabled when /EHsc is
not fed to parseOption (which happens when the exceptions_off config
is encountered).
For VS2003 the values are a bit different where "false"==ehNone,
"true"==ehNoSEH and ehSEH is not available. The default is "true"
if not specified thus why we set it to "false" when exceptions_off
is given.
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/win32/msbuild_objectmodel.cpp | 1 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_objectmodel.cpp | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index 75fc910a1d..bf874b267d 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -385,6 +385,7 @@ VCXCLCompilerTool::VCXCLCompilerTool() DisableLanguageExtensions(unset), EnableFiberSafeOptimizations(unset), EnablePREfast(unset), + ExceptionHandling("false"), ExpandAttributedSource(unset), FloatingPointExceptions(unset), ForceConformanceInForLoopScope(unset), diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index 1e060a005f..e23e119815 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -360,8 +360,11 @@ inline XmlOutput::xml_output xformUsePrecompiledHeaderForNET2005(pchOption whatP inline XmlOutput::xml_output xformExceptionHandlingNET2005(exceptionHandling eh, DotNET compilerVersion) { - if (eh == ehDefault) - return noxml(); + if (eh == ehDefault) { + if (compilerVersion >= NET2005) + return attrE(_ExceptionHandling, ehNone); + return attrS(_ExceptionHandling, "false"); + } if (compilerVersion >= NET2005) return attrE(_ExceptionHandling, eh); |