fix /SAFESEH linker option for VS >= 2010

In VS 2010 and newer the /SAFESEH linker option is not passed as
additional option but is represented by the property
ImageHasSafeExceptionHandlers.

Task-number: QTBUG-34392
Change-Id: I3bd19078e695716050dd20736b6bc589bcb1cefd
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
This commit is contained in:
Joerg Bornemann 2013-10-29 14:38:11 +01:00 committed by The Qt Project
parent 2a704239ea
commit 175489f102
3 changed files with 9 additions and 4 deletions

View File

@ -147,6 +147,7 @@ const char _HeapReserveSize[] = "HeapReserveSize";
const char _IgnoreAllDefaultLibraries[] = "IgnoreAllDefaultLibraries";
const char _IgnoreEmbeddedIDL[] = "IgnoreEmbeddedIDL";
const char _IgnoreImportLibrary[] = "IgnoreImportLibrary";
const char _ImageHasSafeExceptionHandlers[] = "ImageHasSafeExceptionHandlers";
const char _IgnoreSpecificDefaultLibraries[] = "IgnoreSpecificDefaultLibraries";
const char _IgnoreStandardIncludePath[] = "IgnoreStandardIncludePath";
const char _ImportLibrary[] = "ImportLibrary";
@ -1494,6 +1495,7 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCLinkerTool &tool)
<< attrTagT(_IgnoreAllDefaultLibraries, tool.IgnoreAllDefaultLibraries)
<< attrTagT(_IgnoreEmbeddedIDL, tool.IgnoreEmbeddedIDL)
<< attrTagT(_IgnoreImportLibrary, tool.IgnoreImportLibrary)
<< attrTagT(_ImageHasSafeExceptionHandlers, tool.ImageHasSafeExceptionHandlers)
<< attrTagX(_IgnoreSpecificDefaultLibraries, tool.IgnoreDefaultLibraryNames, ";")
<< attrTagS(_ImportLibrary, tool.ImportLibrary)
<< attrTagS(_KeyContainer, tool.KeyContainer)

View File

@ -1172,6 +1172,7 @@ VCLinkerTool::VCLinkerTool()
IgnoreAllDefaultLibraries(unset),
IgnoreEmbeddedIDL(unset),
IgnoreImportLibrary(_True),
ImageHasSafeExceptionHandlers(unset),
LargeAddressAware(addrAwareDefault),
LinkDLL(unset),
LinkIncremental(linkIncrementalDefault),
@ -1654,11 +1655,12 @@ bool VCLinkerTool::parseOption(const char* option)
StackCommitSize = both[1].toLongLong();
}
break;
case 0x75AA4D8: // /SAFESH:{NO}
{
case 0x75AA4D8: // /SAFESEH:{NO}
if (config->CompilerVersion >= NET2010)
ImageHasSafeExceptionHandlers = (option[8] == ':') ? _False : _True;
else
AdditionalOptions += option;
break;
}
break;
case 0x9B3C00D:
case 0x78dc00d: // /SUBSYSTEM:{CONSOLE|EFI_APPLICATION|EFI_BOOT_SERVICE_DRIVER|EFI_ROM|EFI_RUNTIME_DRIVER|NATIVE|POSIX|WINDOWS|WINDOWSCE}[,major[.minor]]
{

View File

@ -615,6 +615,7 @@ public:
QStringList IgnoreDefaultLibraryNames;
triState IgnoreEmbeddedIDL;
triState IgnoreImportLibrary;
triState ImageHasSafeExceptionHandlers;
QString ImportLibrary;
addressAwarenessType LargeAddressAware;
triState LinkDLL;