From 17a397c22a7c7f14aa001f85f64c36428c71414a Mon Sep 17 00:00:00 2001 From: Ian Hojnicki Date: Thu, 22 Jun 2017 16:37:05 -0500 Subject: VS: Split link flag table between v140 and v141 toolsets --- Source/cmGlobalVisualStudio14Generator.cxx | 4 +- Source/cmGlobalVisualStudio15Generator.cxx | 2 + Source/cmVS140LinkFlagTable.h | 280 +++++++++++++++++++++++++++++ Source/cmVS141LinkFlagTable.h | 280 +++++++++++++++++++++++++++++ Source/cmVS14LinkFlagTable.h | 280 ----------------------------- Source/cmVisualStudio10ToolsetOptions.cxx | 9 +- 6 files changed, 570 insertions(+), 285 deletions(-) create mode 100644 Source/cmVS140LinkFlagTable.h create mode 100644 Source/cmVS141LinkFlagTable.h delete mode 100644 Source/cmVS14LinkFlagTable.h diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx index df086d3..c8cf02c 100644 --- a/Source/cmGlobalVisualStudio14Generator.cxx +++ b/Source/cmGlobalVisualStudio14Generator.cxx @@ -8,8 +8,8 @@ #include "cmMakefile.h" #include "cmVS140CLFlagTable.h" #include "cmVS140CSharpFlagTable.h" +#include "cmVS140LinkFlagTable.h" #include "cmVS14LibFlagTable.h" -#include "cmVS14LinkFlagTable.h" #include "cmVS14MASMFlagTable.h" #include "cmVS14RCFlagTable.h" @@ -93,7 +93,7 @@ cmGlobalVisualStudio14Generator::cmGlobalVisualStudio14Generator( this->DefaultClFlagTable = cmVS140CLFlagTable; this->DefaultCSharpFlagTable = cmVS140CSharpFlagTable; this->DefaultLibFlagTable = cmVS14LibFlagTable; - this->DefaultLinkFlagTable = cmVS14LinkFlagTable; + this->DefaultLinkFlagTable = cmVS140LinkFlagTable; this->DefaultMasmFlagTable = cmVS14MASMFlagTable; this->DefaultRcFlagTable = cmVS14RCFlagTable; this->Version = VS14; diff --git a/Source/cmGlobalVisualStudio15Generator.cxx b/Source/cmGlobalVisualStudio15Generator.cxx index da2bf8c..ce1ba00 100644 --- a/Source/cmGlobalVisualStudio15Generator.cxx +++ b/Source/cmGlobalVisualStudio15Generator.cxx @@ -8,6 +8,7 @@ #include "cmMakefile.h" #include "cmVS141CLFlagTable.h" #include "cmVS141CSharpFlagTable.h" +#include "cmVS141LinkFlagTable.h" #include "cmVSSetupHelper.h" static const char vs15generatorName[] = "Visual Studio 15 2017"; @@ -85,6 +86,7 @@ cmGlobalVisualStudio15Generator::cmGlobalVisualStudio15Generator( this->DefaultPlatformToolset = "v141"; this->DefaultClFlagTable = cmVS141CLFlagTable; this->DefaultCSharpFlagTable = cmVS141CSharpFlagTable; + this->DefaultLinkFlagTable = cmVS141LinkFlagTable; this->Version = VS15; } diff --git a/Source/cmVS140LinkFlagTable.h b/Source/cmVS140LinkFlagTable.h new file mode 100644 index 0000000..618087a --- /dev/null +++ b/Source/cmVS140LinkFlagTable.h @@ -0,0 +1,280 @@ +static cmVS7FlagTable cmVS140LinkFlagTable[] = { + + // Enum Properties + { "ShowProgress", "", "Not Set", "NotSet", 0 }, + { "ShowProgress", "VERBOSE", "Display all progress messages", "LinkVerbose", + 0 }, + { "ShowProgress", "VERBOSE:Lib", "For Libraries Searched", "LinkVerboseLib", + 0 }, + { "ShowProgress", "VERBOSE:ICF", + "About COMDAT folding during optimized linking", "LinkVerboseICF", 0 }, + { "ShowProgress", "VERBOSE:REF", + "About data removed during optimized linking", "LinkVerboseREF", 0 }, + { "ShowProgress", "VERBOSE:SAFESEH", "About Modules incompatible with SEH", + "LinkVerboseSAFESEH", 0 }, + { "ShowProgress", "VERBOSE:CLR", + "About linker activity related to managed code", "LinkVerboseCLR", 0 }, + + { "ForceFileOutput", "FORCE", "Enabled", "Enabled", 0 }, + { "ForceFileOutput", "FORCE:MULTIPLE", "Multiply Defined Symbol Only", + "MultiplyDefinedSymbolOnly", 0 }, + { "ForceFileOutput", "FORCE:UNRESOLVED", "Undefined Symbol Only", + "UndefinedSymbolOnly", 0 }, + + { "CreateHotPatchableImage", "FUNCTIONPADMIN", "Enabled", "Enabled", 0 }, + { "CreateHotPatchableImage", "FUNCTIONPADMIN:5", "X86 Image Only", + "X86Image", 0 }, + { "CreateHotPatchableImage", "FUNCTIONPADMIN:6", "X64 Image Only", + "X64Image", 0 }, + { "CreateHotPatchableImage", "FUNCTIONPADMIN:16", "Itanium Image Only", + "ItaniumImage", 0 }, + + { "UACExecutionLevel", "level='asInvoker'", "asInvoker", "AsInvoker", 0 }, + { "UACExecutionLevel", "level='highestAvailable'", "highestAvailable", + "HighestAvailable", 0 }, + { "UACExecutionLevel", "level='requireAdministrator'", + "requireAdministrator", "RequireAdministrator", 0 }, + + { "GenerateDebugInformation", "DEBUG:FASTLINK", + "Optimize for faster linking", "DebugFastLink", + cmVS7FlagTable::CaseInsensitive }, + { "GenerateDebugInformation", "DEBUG", "Optimize for debugging", "Debug", + cmVS7FlagTable::CaseInsensitive }, + + { "SubSystem", "", "Not Set", "NotSet", 0 }, + { "SubSystem", "SUBSYSTEM:CONSOLE", "Console", "Console", 0 }, + { "SubSystem", "SUBSYSTEM:WINDOWS", "Windows", "Windows", 0 }, + { "SubSystem", "SUBSYSTEM:NATIVE", "Native", "Native", 0 }, + { "SubSystem", "SUBSYSTEM:EFI_APPLICATION", "EFI Application", + "EFI Application", 0 }, + { "SubSystem", "SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER", + "EFI Boot Service Driver", "EFI Boot Service Driver", 0 }, + { "SubSystem", "SUBSYSTEM:EFI_ROM", "EFI ROM", "EFI ROM", 0 }, + { "SubSystem", "SUBSYSTEM:EFI_RUNTIME_DRIVER", "EFI Runtime", "EFI Runtime", + 0 }, + { "SubSystem", "SUBSYSTEM:POSIX", "POSIX", "POSIX", 0 }, + + { "Driver", "", "Not Set", "NotSet", 0 }, + { "Driver", "Driver", "Driver", "Driver", 0 }, + { "Driver", "DRIVER:UPONLY", "UP Only", "UpOnly", 0 }, + { "Driver", "DRIVER:WDM", "WDM", "WDM", 0 }, + + { "LinkTimeCodeGeneration", "", "Default", "Default", 0 }, + { "LinkTimeCodeGeneration", "LTCG:incremental", + "Use Fast Link Time Code Generation", "UseFastLinkTimeCodeGeneration", 0 }, + { "LinkTimeCodeGeneration", "LTCG", "Use Link Time Code Generation", + "UseLinkTimeCodeGeneration", 0 }, + { "LinkTimeCodeGeneration", "LTCG:PGInstrument", + "Profile Guided Optimization - Instrument", "PGInstrument", 0 }, + { "LinkTimeCodeGeneration", "LTCG:PGOptimize", + "Profile Guided Optimization - Optimization", "PGOptimization", 0 }, + { "LinkTimeCodeGeneration", "LTCG:PGUpdate", + "Profile Guided Optimization - Update", "PGUpdate", 0 }, + + { "GenerateWindowsMetadata", "WINMD", "Yes", "true", 0 }, + { "GenerateWindowsMetadata", "WINMD:NO", "No", "false", 0 }, + + { "WindowsMetadataSignHash", "WINMDSIGNHASH:SHA1", "SHA1", "SHA1", 0 }, + { "WindowsMetadataSignHash", "WINMDSIGNHASH:SHA256", "SHA256", "SHA256", 0 }, + { "WindowsMetadataSignHash", "WINMDSIGNHASH:SHA384", "SHA384", "SHA384", 0 }, + { "WindowsMetadataSignHash", "WINMDSIGNHASH:SHA512", "SHA512", "SHA512", 0 }, + + { "TargetMachine", "", "Not Set", "NotSet", 0 }, + { "TargetMachine", "MACHINE:ARM", "MachineARM", "MachineARM", 0 }, + { "TargetMachine", "MACHINE:EBC", "MachineEBC", "MachineEBC", 0 }, + { "TargetMachine", "MACHINE:IA64", "MachineIA64", "MachineIA64", 0 }, + { "TargetMachine", "MACHINE:MIPS", "MachineMIPS", "MachineMIPS", 0 }, + { "TargetMachine", "MACHINE:MIPS16", "MachineMIPS16", "MachineMIPS16", 0 }, + { "TargetMachine", "MACHINE:MIPSFPU", "MachineMIPSFPU", "MachineMIPSFPU", + 0 }, + { "TargetMachine", "MACHINE:MIPSFPU16", "MachineMIPSFPU16", + "MachineMIPSFPU16", 0 }, + { "TargetMachine", "MACHINE:SH4", "MachineSH4", "MachineSH4", 0 }, + { "TargetMachine", "MACHINE:THUMB", "MachineTHUMB", "MachineTHUMB", 0 }, + { "TargetMachine", "MACHINE:X64", "MachineX64", "MachineX64", 0 }, + { "TargetMachine", "MACHINE:X86", "MachineX86", "MachineX86", 0 }, + + { "CLRThreadAttribute", "CLRTHREADATTRIBUTE:MTA", "MTA threading attribute", + "MTAThreadingAttribute", 0 }, + { "CLRThreadAttribute", "CLRTHREADATTRIBUTE:STA", "STA threading attribute", + "STAThreadingAttribute", 0 }, + { "CLRThreadAttribute", "CLRTHREADATTRIBUTE:NONE", + "Default threading attribute", "DefaultThreadingAttribute", 0 }, + + { "CLRImageType", "CLRIMAGETYPE:IJW", "Force IJW image", "ForceIJWImage", + 0 }, + { "CLRImageType", "CLRIMAGETYPE:PURE", "Force Pure IL Image", + "ForcePureILImage", 0 }, + { "CLRImageType", "CLRIMAGETYPE:SAFE", "Force Safe IL Image", + "ForceSafeILImage", 0 }, + { "CLRImageType", "", "Default image type", "Default", 0 }, + + { "SignHash", "CLRSIGNHASH:SHA1", "SHA1", "SHA1", 0 }, + { "SignHash", "CLRSIGNHASH:SHA256", "SHA256", "SHA256", 0 }, + { "SignHash", "CLRSIGNHASH:SHA384", "SHA384", "SHA384", 0 }, + { "SignHash", "CLRSIGNHASH:SHA512", "SHA512", "SHA512", 0 }, + + { "LinkErrorReporting", "ERRORREPORT:PROMPT", "PromptImmediately", + "PromptImmediately", 0 }, + { "LinkErrorReporting", "ERRORREPORT:QUEUE", "Queue For Next Login", + "QueueForNextLogin", 0 }, + { "LinkErrorReporting", "ERRORREPORT:SEND", "Send Error Report", + "SendErrorReport", 0 }, + { "LinkErrorReporting", "ERRORREPORT:NONE", "No Error Report", + "NoErrorReport", 0 }, + + { "CLRSupportLastError", "CLRSupportLastError", "Enabled", "Enabled", 0 }, + { "CLRSupportLastError", "CLRSupportLastError:NO", "Disabled", "Disabled", + 0 }, + { "CLRSupportLastError", "CLRSupportLastError:SYSTEMDLL", "System Dlls Only", + "SystemDlls", 0 }, + + { "LinkControlFlowGuard", "guard:cf", "Enable Security Check with Guard", + "Guard", 0 }, + + // Bool Properties + { "LinkIncremental", "INCREMENTAL:NO", "", "false", 0 }, + { "LinkIncremental", "INCREMENTAL", "", "true", 0 }, + { "SuppressStartupBanner", "NOLOGO", "", "true", 0 }, + { "LinkStatus", "LTCG:NOSTATUS", "", "false", 0 }, + { "LinkStatus", "LTCG:STATUS", "", "true", 0 }, + { "PreventDllBinding", "ALLOWBIND:NO", "", "false", 0 }, + { "PreventDllBinding", "ALLOWBIND", "", "true", 0 }, + { "TreatLinkerWarningAsErrors", "WX:NO", "", "false", 0 }, + { "TreatLinkerWarningAsErrors", "WX", "", "true", 0 }, + { "IgnoreAllDefaultLibraries", "NODEFAULTLIB", "", "true", 0 }, + { "GenerateManifest", "MANIFEST:NO", "", "false", 0 }, + { "GenerateManifest", "MANIFEST", "", "true", 0 }, + { "AllowIsolation", "ALLOWISOLATION:NO", "", "false", 0 }, + { "UACUIAccess", "uiAccess='false'", "", "false", 0 }, + { "UACUIAccess", "uiAccess='true'", "", "true", 0 }, + { "ManifestEmbed", "manifest:embed", "", "true", 0 }, + { "MapExports", "MAPINFO:EXPORTS", "", "true", 0 }, + { "AssemblyDebug", "ASSEMBLYDEBUG:DISABLE", "", "false", 0 }, + { "AssemblyDebug", "ASSEMBLYDEBUG", "", "true", 0 }, + { "LargeAddressAware", "LARGEADDRESSAWARE:NO", "", "false", 0 }, + { "LargeAddressAware", "LARGEADDRESSAWARE", "", "true", 0 }, + { "TerminalServerAware", "TSAWARE:NO", "", "false", 0 }, + { "TerminalServerAware", "TSAWARE", "", "true", 0 }, + { "SwapRunFromCD", "SWAPRUN:CD", "", "true", 0 }, + { "SwapRunFromNET", "SWAPRUN:NET", "", "true", 0 }, + { "OptimizeReferences", "OPT:NOREF", "", "false", 0 }, + { "OptimizeReferences", "OPT:REF", "", "true", 0 }, + { "EnableCOMDATFolding", "OPT:NOICF", "", "false", 0 }, + { "EnableCOMDATFolding", "OPT:ICF", "", "true", 0 }, + { "IgnoreEmbeddedIDL", "IGNOREIDL", "", "true", 0 }, + { "AppContainer", "APPCONTAINER", "", "true", 0 }, + { "WindowsMetadataLinkDelaySign", "WINMDDELAYSIGN:NO", "", "false", 0 }, + { "WindowsMetadataLinkDelaySign", "WINMDDELAYSIGN", "", "true", 0 }, + { "NoEntryPoint", "NOENTRY", "", "true", 0 }, + { "SetChecksum", "RELEASE", "", "true", 0 }, + { "RandomizedBaseAddress", "DYNAMICBASE:NO", "", "false", 0 }, + { "RandomizedBaseAddress", "DYNAMICBASE", "", "true", 0 }, + { "FixedBaseAddress", "FIXED:NO", "", "false", 0 }, + { "FixedBaseAddress", "FIXED", "", "true", 0 }, + { "DataExecutionPrevention", "NXCOMPAT:NO", "", "false", 0 }, + { "DataExecutionPrevention", "NXCOMPAT", "", "true", 0 }, + { "TurnOffAssemblyGeneration", "NOASSEMBLY", "", "true", 0 }, + { "SupportUnloadOfDelayLoadedDLL", "DELAY:UNLOAD", "", "true", 0 }, + { "SupportNobindOfDelayLoadedDLL", "DELAY:NOBIND", "", "true", 0 }, + { "Profile", "PROFILE", "", "true", 0 }, + { "LinkDelaySign", "DELAYSIGN:NO", "", "false", 0 }, + { "LinkDelaySign", "DELAYSIGN", "", "true", 0 }, + { "CLRUnmanagedCodeCheck", "CLRUNMANAGEDCODECHECK:NO", "", "false", 0 }, + { "CLRUnmanagedCodeCheck", "CLRUNMANAGEDCODECHECK", "", "true", 0 }, + { "DetectOneDefinitionRule", "ODR", "", "true", 0 }, + { "ImageHasSafeExceptionHandlers", "SAFESEH:NO", "", "false", 0 }, + { "ImageHasSafeExceptionHandlers", "SAFESEH", "", "true", 0 }, + { "LinkDLL", "DLL", "", "true", 0 }, + + // Bool Properties With Argument + { "EnableUAC", "MANIFESTUAC:NO", "", "false", 0 }, + { "EnableUAC", "MANIFESTUAC:", "", "true", + cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue }, + { "UACUIAccess", "MANIFESTUAC:", "Enable User Account Control (UAC)", "", + cmVS7FlagTable::UserValueRequired }, + { "GenerateMapFile", "MAP", "", "true", + cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue }, + { "MapFileName", "MAP:", "Generate Map File", "", + cmVS7FlagTable::UserValueRequired }, + + // String List Properties + { "AdditionalLibraryDirectories", "LIBPATH:", + "Additional Library Directories", "", + cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, + { "Natvis", "NATVIS:", "Natvis files", "", + cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, + // Skip [AdditionalDependencies] - no command line Switch. + { "IgnoreSpecificDefaultLibraries", "NODEFAULTLIB:", + "Ignore Specific Default Libraries", "", + cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, + { "AddModuleNamesToAssembly", "ASSEMBLYMODULE:", "Add Module to Assembly", + "", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, + { "EmbedManagedResourceFile", "ASSEMBLYRESOURCE:", + "Embed Managed Resource File", "", + cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, + { "ForceSymbolReferences", "INCLUDE:", "Force Symbol References", "", + cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, + { "DelayLoadDLLs", "DELAYLOAD:", "Delay Loaded Dlls", "", + cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, + { "AssemblyLinkResource", "ASSEMBLYLINKRESOURCE:", "Assembly Link Resource", + "", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, + { "AdditionalManifestDependencies", "MANIFESTDEPENDENCY:", + "Additional Manifest Dependencies", "", + cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, + { "ManifestInput", "manifestinput:", "Manifest Input", "", + cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, + + // String Properties + { "OutputFile", "OUT:", "Output File", "", cmVS7FlagTable::UserValue }, + { "Version", "VERSION:", "Version", "", cmVS7FlagTable::UserValue }, + { "SpecifySectionAttributes", "SECTION:", "Specify Section Attributes", "", + cmVS7FlagTable::UserValue }, + { "MSDOSStubFileName", "STUB:", "MS-DOS Stub File Name", "", + cmVS7FlagTable::UserValue }, + // Skip [TrackerLogDirectory] - no command line Switch. + { "ModuleDefinitionFile", "DEF:", "Module Definition File", "", + cmVS7FlagTable::UserValue }, + { "ManifestFile", "ManifestFile:", "Manifest File", "", + cmVS7FlagTable::UserValue }, + { "ProgramDatabaseFile", "PDB:", "Generate Program Database File", "", + cmVS7FlagTable::UserValue }, + { "StripPrivateSymbols", "PDBSTRIPPED:", "Strip Private Symbols", "", + cmVS7FlagTable::UserValue }, + // Skip [MapFileName] - no command line Switch. + // Skip [MinimumRequiredVersion] - no command line Switch. + { "HeapReserveSize", "HEAP:", "Heap Reserve Size", "", + cmVS7FlagTable::UserValue }, + // Skip [HeapCommitSize] - no command line Switch. + { "StackReserveSize", "STACK:", "Stack Reserve Size", "", + cmVS7FlagTable::UserValue }, + // Skip [StackCommitSize] - no command line Switch. + { "FunctionOrder", "ORDER:@", "Function Order", "", + cmVS7FlagTable::UserValue }, + { "ProfileGuidedDatabase", "PGD:", "Profile Guided Database", "", + cmVS7FlagTable::UserValue }, + { "MidlCommandFile", "MIDL:@", "MIDL Commands", "", + cmVS7FlagTable::UserValue }, + { "MergedIDLBaseFileName", "IDLOUT:", "Merged IDL Base File Name", "", + cmVS7FlagTable::UserValue }, + { "TypeLibraryFile", "TLBOUT:", "Type Library", "", + cmVS7FlagTable::UserValue }, + { "WindowsMetadataFile", "WINMDFILE:", "Windows Metadata File", "", + cmVS7FlagTable::UserValue }, + { "WindowsMetadataLinkKeyFile", "WINMDKEYFILE:", "Windows Metadata Key File", + "", cmVS7FlagTable::UserValue }, + { "WindowsMetadataKeyContainer", "WINMDKEYCONTAINER:", + "Windows Metadata Key Container", "", cmVS7FlagTable::UserValue }, + { "EntryPointSymbol", "ENTRY:", "Entry Point", "", + cmVS7FlagTable::UserValue }, + { "BaseAddress", "BASE:", "Base Address", "", cmVS7FlagTable::UserValue }, + { "ImportLibrary", "IMPLIB:", "Import Library", "", + cmVS7FlagTable::UserValue }, + { "MergeSections", "MERGE:", "Merge Sections", "", + cmVS7FlagTable::UserValue }, + { "LinkKeyFile", "KEYFILE:", "Key File", "", cmVS7FlagTable::UserValue }, + { "KeyContainer", "KEYCONTAINER:", "Key Container", "", + cmVS7FlagTable::UserValue }, + // Skip [AdditionalOptions] - no command line Switch. + { 0, 0, 0, 0, 0 } +}; diff --git a/Source/cmVS141LinkFlagTable.h b/Source/cmVS141LinkFlagTable.h new file mode 100644 index 0000000..ec5dc2a --- /dev/null +++ b/Source/cmVS141LinkFlagTable.h @@ -0,0 +1,280 @@ +static cmVS7FlagTable cmVS141LinkFlagTable[] = { + + // Enum Properties + { "ShowProgress", "", "Not Set", "NotSet", 0 }, + { "ShowProgress", "VERBOSE", "Display all progress messages", "LinkVerbose", + 0 }, + { "ShowProgress", "VERBOSE:Lib", "For Libraries Searched", "LinkVerboseLib", + 0 }, + { "ShowProgress", "VERBOSE:ICF", + "About COMDAT folding during optimized linking", "LinkVerboseICF", 0 }, + { "ShowProgress", "VERBOSE:REF", + "About data removed during optimized linking", "LinkVerboseREF", 0 }, + { "ShowProgress", "VERBOSE:SAFESEH", "About Modules incompatible with SEH", + "LinkVerboseSAFESEH", 0 }, + { "ShowProgress", "VERBOSE:CLR", + "About linker activity related to managed code", "LinkVerboseCLR", 0 }, + + { "ForceFileOutput", "FORCE", "Enabled", "Enabled", 0 }, + { "ForceFileOutput", "FORCE:MULTIPLE", "Multiply Defined Symbol Only", + "MultiplyDefinedSymbolOnly", 0 }, + { "ForceFileOutput", "FORCE:UNRESOLVED", "Undefined Symbol Only", + "UndefinedSymbolOnly", 0 }, + + { "CreateHotPatchableImage", "FUNCTIONPADMIN", "Enabled", "Enabled", 0 }, + { "CreateHotPatchableImage", "FUNCTIONPADMIN:5", "X86 Image Only", + "X86Image", 0 }, + { "CreateHotPatchableImage", "FUNCTIONPADMIN:6", "X64 Image Only", + "X64Image", 0 }, + { "CreateHotPatchableImage", "FUNCTIONPADMIN:16", "Itanium Image Only", + "ItaniumImage", 0 }, + + { "UACExecutionLevel", "level='asInvoker'", "asInvoker", "AsInvoker", 0 }, + { "UACExecutionLevel", "level='highestAvailable'", "highestAvailable", + "HighestAvailable", 0 }, + { "UACExecutionLevel", "level='requireAdministrator'", + "requireAdministrator", "RequireAdministrator", 0 }, + + { "GenerateDebugInformation", "DEBUG:FASTLINK", + "Optimize for faster linking", "DebugFastLink", + cmVS7FlagTable::CaseInsensitive }, + { "GenerateDebugInformation", "DEBUG", "Optimize for debugging", "Debug", + cmVS7FlagTable::CaseInsensitive }, + + { "SubSystem", "", "Not Set", "NotSet", 0 }, + { "SubSystem", "SUBSYSTEM:CONSOLE", "Console", "Console", 0 }, + { "SubSystem", "SUBSYSTEM:WINDOWS", "Windows", "Windows", 0 }, + { "SubSystem", "SUBSYSTEM:NATIVE", "Native", "Native", 0 }, + { "SubSystem", "SUBSYSTEM:EFI_APPLICATION", "EFI Application", + "EFI Application", 0 }, + { "SubSystem", "SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER", + "EFI Boot Service Driver", "EFI Boot Service Driver", 0 }, + { "SubSystem", "SUBSYSTEM:EFI_ROM", "EFI ROM", "EFI ROM", 0 }, + { "SubSystem", "SUBSYSTEM:EFI_RUNTIME_DRIVER", "EFI Runtime", "EFI Runtime", + 0 }, + { "SubSystem", "SUBSYSTEM:POSIX", "POSIX", "POSIX", 0 }, + + { "Driver", "", "Not Set", "NotSet", 0 }, + { "Driver", "Driver", "Driver", "Driver", 0 }, + { "Driver", "DRIVER:UPONLY", "UP Only", "UpOnly", 0 }, + { "Driver", "DRIVER:WDM", "WDM", "WDM", 0 }, + + { "LinkTimeCodeGeneration", "", "Default", "Default", 0 }, + { "LinkTimeCodeGeneration", "LTCG:incremental", + "Use Fast Link Time Code Generation", "UseFastLinkTimeCodeGeneration", 0 }, + { "LinkTimeCodeGeneration", "LTCG", "Use Link Time Code Generation", + "UseLinkTimeCodeGeneration", 0 }, + { "LinkTimeCodeGeneration", "LTCG:PGInstrument", + "Profile Guided Optimization - Instrument", "PGInstrument", 0 }, + { "LinkTimeCodeGeneration", "LTCG:PGOptimize", + "Profile Guided Optimization - Optimization", "PGOptimization", 0 }, + { "LinkTimeCodeGeneration", "LTCG:PGUpdate", + "Profile Guided Optimization - Update", "PGUpdate", 0 }, + + { "GenerateWindowsMetadata", "WINMD", "Yes", "true", 0 }, + { "GenerateWindowsMetadata", "WINMD:NO", "No", "false", 0 }, + + { "WindowsMetadataSignHash", "WINMDSIGNHASH:SHA1", "SHA1", "SHA1", 0 }, + { "WindowsMetadataSignHash", "WINMDSIGNHASH:SHA256", "SHA256", "SHA256", 0 }, + { "WindowsMetadataSignHash", "WINMDSIGNHASH:SHA384", "SHA384", "SHA384", 0 }, + { "WindowsMetadataSignHash", "WINMDSIGNHASH:SHA512", "SHA512", "SHA512", 0 }, + + { "TargetMachine", "", "Not Set", "NotSet", 0 }, + { "TargetMachine", "MACHINE:ARM", "MachineARM", "MachineARM", 0 }, + { "TargetMachine", "MACHINE:EBC", "MachineEBC", "MachineEBC", 0 }, + { "TargetMachine", "MACHINE:IA64", "MachineIA64", "MachineIA64", 0 }, + { "TargetMachine", "MACHINE:MIPS", "MachineMIPS", "MachineMIPS", 0 }, + { "TargetMachine", "MACHINE:MIPS16", "MachineMIPS16", "MachineMIPS16", 0 }, + { "TargetMachine", "MACHINE:MIPSFPU", "MachineMIPSFPU", "MachineMIPSFPU", + 0 }, + { "TargetMachine", "MACHINE:MIPSFPU16", "MachineMIPSFPU16", + "MachineMIPSFPU16", 0 }, + { "TargetMachine", "MACHINE:SH4", "MachineSH4", "MachineSH4", 0 }, + { "TargetMachine", "MACHINE:THUMB", "MachineTHUMB", "MachineTHUMB", 0 }, + { "TargetMachine", "MACHINE:X64", "MachineX64", "MachineX64", 0 }, + { "TargetMachine", "MACHINE:X86", "MachineX86", "MachineX86", 0 }, + + { "CLRThreadAttribute", "CLRTHREADATTRIBUTE:MTA", "MTA threading attribute", + "MTAThreadingAttribute", 0 }, + { "CLRThreadAttribute", "CLRTHREADATTRIBUTE:STA", "STA threading attribute", + "STAThreadingAttribute", 0 }, + { "CLRThreadAttribute", "CLRTHREADATTRIBUTE:NONE", + "Default threading attribute", "DefaultThreadingAttribute", 0 }, + + { "CLRImageType", "CLRIMAGETYPE:IJW", "Force IJW image", "ForceIJWImage", + 0 }, + { "CLRImageType", "CLRIMAGETYPE:PURE", "Force Pure IL Image", + "ForcePureILImage", 0 }, + { "CLRImageType", "CLRIMAGETYPE:SAFE", "Force Safe IL Image", + "ForceSafeILImage", 0 }, + { "CLRImageType", "", "Default image type", "Default", 0 }, + + { "SignHash", "CLRSIGNHASH:SHA1", "SHA1", "SHA1", 0 }, + { "SignHash", "CLRSIGNHASH:SHA256", "SHA256", "SHA256", 0 }, + { "SignHash", "CLRSIGNHASH:SHA384", "SHA384", "SHA384", 0 }, + { "SignHash", "CLRSIGNHASH:SHA512", "SHA512", "SHA512", 0 }, + + { "LinkErrorReporting", "ERRORREPORT:PROMPT", "PromptImmediately", + "PromptImmediately", 0 }, + { "LinkErrorReporting", "ERRORREPORT:QUEUE", "Queue For Next Login", + "QueueForNextLogin", 0 }, + { "LinkErrorReporting", "ERRORREPORT:SEND", "Send Error Report", + "SendErrorReport", 0 }, + { "LinkErrorReporting", "ERRORREPORT:NONE", "No Error Report", + "NoErrorReport", 0 }, + + { "CLRSupportLastError", "CLRSupportLastError", "Enabled", "Enabled", 0 }, + { "CLRSupportLastError", "CLRSupportLastError:NO", "Disabled", "Disabled", + 0 }, + { "CLRSupportLastError", "CLRSupportLastError:SYSTEMDLL", "System Dlls Only", + "SystemDlls", 0 }, + + { "LinkControlFlowGuard", "guard:cf", "Enable Security Check with Guard", + "Guard", 0 }, + + // Bool Properties + { "LinkIncremental", "INCREMENTAL:NO", "", "false", 0 }, + { "LinkIncremental", "INCREMENTAL", "", "true", 0 }, + { "SuppressStartupBanner", "NOLOGO", "", "true", 0 }, + { "LinkStatus", "LTCG:NOSTATUS", "", "false", 0 }, + { "LinkStatus", "LTCG:STATUS", "", "true", 0 }, + { "PreventDllBinding", "ALLOWBIND:NO", "", "false", 0 }, + { "PreventDllBinding", "ALLOWBIND", "", "true", 0 }, + { "TreatLinkerWarningAsErrors", "WX:NO", "", "false", 0 }, + { "TreatLinkerWarningAsErrors", "WX", "", "true", 0 }, + { "IgnoreAllDefaultLibraries", "NODEFAULTLIB", "", "true", 0 }, + { "GenerateManifest", "MANIFEST:NO", "", "false", 0 }, + { "GenerateManifest", "MANIFEST", "", "true", 0 }, + { "AllowIsolation", "ALLOWISOLATION:NO", "", "false", 0 }, + { "UACUIAccess", "uiAccess='false'", "", "false", 0 }, + { "UACUIAccess", "uiAccess='true'", "", "true", 0 }, + { "ManifestEmbed", "manifest:embed", "", "true", 0 }, + { "MapExports", "MAPINFO:EXPORTS", "", "true", 0 }, + { "AssemblyDebug", "ASSEMBLYDEBUG:DISABLE", "", "false", 0 }, + { "AssemblyDebug", "ASSEMBLYDEBUG", "", "true", 0 }, + { "LargeAddressAware", "LARGEADDRESSAWARE:NO", "", "false", 0 }, + { "LargeAddressAware", "LARGEADDRESSAWARE", "", "true", 0 }, + { "TerminalServerAware", "TSAWARE:NO", "", "false", 0 }, + { "TerminalServerAware", "TSAWARE", "", "true", 0 }, + { "SwapRunFromCD", "SWAPRUN:CD", "", "true", 0 }, + { "SwapRunFromNET", "SWAPRUN:NET", "", "true", 0 }, + { "OptimizeReferences", "OPT:NOREF", "", "false", 0 }, + { "OptimizeReferences", "OPT:REF", "", "true", 0 }, + { "EnableCOMDATFolding", "OPT:NOICF", "", "false", 0 }, + { "EnableCOMDATFolding", "OPT:ICF", "", "true", 0 }, + { "IgnoreEmbeddedIDL", "IGNOREIDL", "", "true", 0 }, + { "AppContainer", "APPCONTAINER", "", "true", 0 }, + { "WindowsMetadataLinkDelaySign", "WINMDDELAYSIGN:NO", "", "false", 0 }, + { "WindowsMetadataLinkDelaySign", "WINMDDELAYSIGN", "", "true", 0 }, + { "NoEntryPoint", "NOENTRY", "", "true", 0 }, + { "SetChecksum", "RELEASE", "", "true", 0 }, + { "RandomizedBaseAddress", "DYNAMICBASE:NO", "", "false", 0 }, + { "RandomizedBaseAddress", "DYNAMICBASE", "", "true", 0 }, + { "FixedBaseAddress", "FIXED:NO", "", "false", 0 }, + { "FixedBaseAddress", "FIXED", "", "true", 0 }, + { "DataExecutionPrevention", "NXCOMPAT:NO", "", "false", 0 }, + { "DataExecutionPrevention", "NXCOMPAT", "", "true", 0 }, + { "TurnOffAssemblyGeneration", "NOASSEMBLY", "", "true", 0 }, + { "SupportUnloadOfDelayLoadedDLL", "DELAY:UNLOAD", "", "true", 0 }, + { "SupportNobindOfDelayLoadedDLL", "DELAY:NOBIND", "", "true", 0 }, + { "Profile", "PROFILE", "", "true", 0 }, + { "LinkDelaySign", "DELAYSIGN:NO", "", "false", 0 }, + { "LinkDelaySign", "DELAYSIGN", "", "true", 0 }, + { "CLRUnmanagedCodeCheck", "CLRUNMANAGEDCODECHECK:NO", "", "false", 0 }, + { "CLRUnmanagedCodeCheck", "CLRUNMANAGEDCODECHECK", "", "true", 0 }, + { "DetectOneDefinitionRule", "ODR", "", "true", 0 }, + { "ImageHasSafeExceptionHandlers", "SAFESEH:NO", "", "false", 0 }, + { "ImageHasSafeExceptionHandlers", "SAFESEH", "", "true", 0 }, + { "LinkDLL", "DLL", "", "true", 0 }, + + // Bool Properties With Argument + { "EnableUAC", "MANIFESTUAC:NO", "", "false", 0 }, + { "EnableUAC", "MANIFESTUAC:", "", "true", + cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue }, + { "UACUIAccess", "MANIFESTUAC:", "Enable User Account Control (UAC)", "", + cmVS7FlagTable::UserValueRequired }, + { "GenerateMapFile", "MAP", "", "true", + cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue }, + { "MapFileName", "MAP:", "Generate Map File", "", + cmVS7FlagTable::UserValueRequired }, + + // String List Properties + { "AdditionalLibraryDirectories", "LIBPATH:", + "Additional Library Directories", "", + cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, + { "Natvis", "NATVIS:", "Natvis files", "", + cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, + // Skip [AdditionalDependencies] - no command line Switch. + { "IgnoreSpecificDefaultLibraries", "NODEFAULTLIB:", + "Ignore Specific Default Libraries", "", + cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, + { "AddModuleNamesToAssembly", "ASSEMBLYMODULE:", "Add Module to Assembly", + "", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, + { "EmbedManagedResourceFile", "ASSEMBLYRESOURCE:", + "Embed Managed Resource File", "", + cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, + { "ForceSymbolReferences", "INCLUDE:", "Force Symbol References", "", + cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, + { "DelayLoadDLLs", "DELAYLOAD:", "Delay Loaded Dlls", "", + cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, + { "AssemblyLinkResource", "ASSEMBLYLINKRESOURCE:", "Assembly Link Resource", + "", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, + { "AdditionalManifestDependencies", "MANIFESTDEPENDENCY:", + "Additional Manifest Dependencies", "", + cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, + { "ManifestInput", "manifestinput:", "Manifest Input", "", + cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, + + // String Properties + { "OutputFile", "OUT:", "Output File", "", cmVS7FlagTable::UserValue }, + { "Version", "VERSION:", "Version", "", cmVS7FlagTable::UserValue }, + { "SpecifySectionAttributes", "SECTION:", "Specify Section Attributes", "", + cmVS7FlagTable::UserValue }, + { "MSDOSStubFileName", "STUB:", "MS-DOS Stub File Name", "", + cmVS7FlagTable::UserValue }, + // Skip [TrackerLogDirectory] - no command line Switch. + { "ModuleDefinitionFile", "DEF:", "Module Definition File", "", + cmVS7FlagTable::UserValue }, + { "ManifestFile", "ManifestFile:", "Manifest File", "", + cmVS7FlagTable::UserValue }, + { "ProgramDatabaseFile", "PDB:", "Generate Program Database File", "", + cmVS7FlagTable::UserValue }, + { "StripPrivateSymbols", "PDBSTRIPPED:", "Strip Private Symbols", "", + cmVS7FlagTable::UserValue }, + // Skip [MapFileName] - no command line Switch. + // Skip [MinimumRequiredVersion] - no command line Switch. + { "HeapReserveSize", "HEAP:", "Heap Reserve Size", "", + cmVS7FlagTable::UserValue }, + // Skip [HeapCommitSize] - no command line Switch. + { "StackReserveSize", "STACK:", "Stack Reserve Size", "", + cmVS7FlagTable::UserValue }, + // Skip [StackCommitSize] - no command line Switch. + { "FunctionOrder", "ORDER:@", "Function Order", "", + cmVS7FlagTable::UserValue }, + { "ProfileGuidedDatabase", "PGD:", "Profile Guided Database", "", + cmVS7FlagTable::UserValue }, + { "MidlCommandFile", "MIDL:@", "MIDL Commands", "", + cmVS7FlagTable::UserValue }, + { "MergedIDLBaseFileName", "IDLOUT:", "Merged IDL Base File Name", "", + cmVS7FlagTable::UserValue }, + { "TypeLibraryFile", "TLBOUT:", "Type Library", "", + cmVS7FlagTable::UserValue }, + { "WindowsMetadataFile", "WINMDFILE:", "Windows Metadata File", "", + cmVS7FlagTable::UserValue }, + { "WindowsMetadataLinkKeyFile", "WINMDKEYFILE:", "Windows Metadata Key File", + "", cmVS7FlagTable::UserValue }, + { "WindowsMetadataKeyContainer", "WINMDKEYCONTAINER:", + "Windows Metadata Key Container", "", cmVS7FlagTable::UserValue }, + { "EntryPointSymbol", "ENTRY:", "Entry Point", "", + cmVS7FlagTable::UserValue }, + { "BaseAddress", "BASE:", "Base Address", "", cmVS7FlagTable::UserValue }, + { "ImportLibrary", "IMPLIB:", "Import Library", "", + cmVS7FlagTable::UserValue }, + { "MergeSections", "MERGE:", "Merge Sections", "", + cmVS7FlagTable::UserValue }, + { "LinkKeyFile", "KEYFILE:", "Key File", "", cmVS7FlagTable::UserValue }, + { "KeyContainer", "KEYCONTAINER:", "Key Container", "", + cmVS7FlagTable::UserValue }, + // Skip [AdditionalOptions] - no command line Switch. + { 0, 0, 0, 0, 0 } +}; diff --git a/Source/cmVS14LinkFlagTable.h b/Source/cmVS14LinkFlagTable.h deleted file mode 100644 index 596f880..0000000 --- a/Source/cmVS14LinkFlagTable.h +++ /dev/null @@ -1,280 +0,0 @@ -static cmVS7FlagTable cmVS14LinkFlagTable[] = { - - // Enum Properties - { "ShowProgress", "", "Not Set", "NotSet", 0 }, - { "ShowProgress", "VERBOSE", "Display all progress messages", "LinkVerbose", - 0 }, - { "ShowProgress", "VERBOSE:Lib", "For Libraries Searched", "LinkVerboseLib", - 0 }, - { "ShowProgress", "VERBOSE:ICF", - "About COMDAT folding during optimized linking", "LinkVerboseICF", 0 }, - { "ShowProgress", "VERBOSE:REF", - "About data removed during optimized linking", "LinkVerboseREF", 0 }, - { "ShowProgress", "VERBOSE:SAFESEH", "About Modules incompatible with SEH", - "LinkVerboseSAFESEH", 0 }, - { "ShowProgress", "VERBOSE:CLR", - "About linker activity related to managed code", "LinkVerboseCLR", 0 }, - - { "ForceFileOutput", "FORCE", "Enabled", "Enabled", 0 }, - { "ForceFileOutput", "FORCE:MULTIPLE", "Multiply Defined Symbol Only", - "MultiplyDefinedSymbolOnly", 0 }, - { "ForceFileOutput", "FORCE:UNRESOLVED", "Undefined Symbol Only", - "UndefinedSymbolOnly", 0 }, - - { "CreateHotPatchableImage", "FUNCTIONPADMIN", "Enabled", "Enabled", 0 }, - { "CreateHotPatchableImage", "FUNCTIONPADMIN:5", "X86 Image Only", - "X86Image", 0 }, - { "CreateHotPatchableImage", "FUNCTIONPADMIN:6", "X64 Image Only", - "X64Image", 0 }, - { "CreateHotPatchableImage", "FUNCTIONPADMIN:16", "Itanium Image Only", - "ItaniumImage", 0 }, - - { "UACExecutionLevel", "level='asInvoker'", "asInvoker", "AsInvoker", 0 }, - { "UACExecutionLevel", "level='highestAvailable'", "highestAvailable", - "HighestAvailable", 0 }, - { "UACExecutionLevel", "level='requireAdministrator'", - "requireAdministrator", "RequireAdministrator", 0 }, - - { "GenerateDebugInformation", "DEBUG:FASTLINK", - "Optimize for faster linking", "DebugFastLink", - cmVS7FlagTable::CaseInsensitive }, - { "GenerateDebugInformation", "DEBUG", "Optimize for debugging", "Debug", - cmVS7FlagTable::CaseInsensitive }, - - { "SubSystem", "", "Not Set", "NotSet", 0 }, - { "SubSystem", "SUBSYSTEM:CONSOLE", "Console", "Console", 0 }, - { "SubSystem", "SUBSYSTEM:WINDOWS", "Windows", "Windows", 0 }, - { "SubSystem", "SUBSYSTEM:NATIVE", "Native", "Native", 0 }, - { "SubSystem", "SUBSYSTEM:EFI_APPLICATION", "EFI Application", - "EFI Application", 0 }, - { "SubSystem", "SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER", - "EFI Boot Service Driver", "EFI Boot Service Driver", 0 }, - { "SubSystem", "SUBSYSTEM:EFI_ROM", "EFI ROM", "EFI ROM", 0 }, - { "SubSystem", "SUBSYSTEM:EFI_RUNTIME_DRIVER", "EFI Runtime", "EFI Runtime", - 0 }, - { "SubSystem", "SUBSYSTEM:POSIX", "POSIX", "POSIX", 0 }, - - { "Driver", "", "Not Set", "NotSet", 0 }, - { "Driver", "Driver", "Driver", "Driver", 0 }, - { "Driver", "DRIVER:UPONLY", "UP Only", "UpOnly", 0 }, - { "Driver", "DRIVER:WDM", "WDM", "WDM", 0 }, - - { "LinkTimeCodeGeneration", "", "Default", "Default", 0 }, - { "LinkTimeCodeGeneration", "LTCG:incremental", - "Use Fast Link Time Code Generation", "UseFastLinkTimeCodeGeneration", 0 }, - { "LinkTimeCodeGeneration", "LTCG", "Use Link Time Code Generation", - "UseLinkTimeCodeGeneration", 0 }, - { "LinkTimeCodeGeneration", "LTCG:PGInstrument", - "Profile Guided Optimization - Instrument", "PGInstrument", 0 }, - { "LinkTimeCodeGeneration", "LTCG:PGOptimize", - "Profile Guided Optimization - Optimization", "PGOptimization", 0 }, - { "LinkTimeCodeGeneration", "LTCG:PGUpdate", - "Profile Guided Optimization - Update", "PGUpdate", 0 }, - - { "GenerateWindowsMetadata", "WINMD", "Yes", "true", 0 }, - { "GenerateWindowsMetadata", "WINMD:NO", "No", "false", 0 }, - - { "WindowsMetadataSignHash", "WINMDSIGNHASH:SHA1", "SHA1", "SHA1", 0 }, - { "WindowsMetadataSignHash", "WINMDSIGNHASH:SHA256", "SHA256", "SHA256", 0 }, - { "WindowsMetadataSignHash", "WINMDSIGNHASH:SHA384", "SHA384", "SHA384", 0 }, - { "WindowsMetadataSignHash", "WINMDSIGNHASH:SHA512", "SHA512", "SHA512", 0 }, - - { "TargetMachine", "", "Not Set", "NotSet", 0 }, - { "TargetMachine", "MACHINE:ARM", "MachineARM", "MachineARM", 0 }, - { "TargetMachine", "MACHINE:EBC", "MachineEBC", "MachineEBC", 0 }, - { "TargetMachine", "MACHINE:IA64", "MachineIA64", "MachineIA64", 0 }, - { "TargetMachine", "MACHINE:MIPS", "MachineMIPS", "MachineMIPS", 0 }, - { "TargetMachine", "MACHINE:MIPS16", "MachineMIPS16", "MachineMIPS16", 0 }, - { "TargetMachine", "MACHINE:MIPSFPU", "MachineMIPSFPU", "MachineMIPSFPU", - 0 }, - { "TargetMachine", "MACHINE:MIPSFPU16", "MachineMIPSFPU16", - "MachineMIPSFPU16", 0 }, - { "TargetMachine", "MACHINE:SH4", "MachineSH4", "MachineSH4", 0 }, - { "TargetMachine", "MACHINE:THUMB", "MachineTHUMB", "MachineTHUMB", 0 }, - { "TargetMachine", "MACHINE:X64", "MachineX64", "MachineX64", 0 }, - { "TargetMachine", "MACHINE:X86", "MachineX86", "MachineX86", 0 }, - - { "CLRThreadAttribute", "CLRTHREADATTRIBUTE:MTA", "MTA threading attribute", - "MTAThreadingAttribute", 0 }, - { "CLRThreadAttribute", "CLRTHREADATTRIBUTE:STA", "STA threading attribute", - "STAThreadingAttribute", 0 }, - { "CLRThreadAttribute", "CLRTHREADATTRIBUTE:NONE", - "Default threading attribute", "DefaultThreadingAttribute", 0 }, - - { "CLRImageType", "CLRIMAGETYPE:IJW", "Force IJW image", "ForceIJWImage", - 0 }, - { "CLRImageType", "CLRIMAGETYPE:PURE", "Force Pure IL Image", - "ForcePureILImage", 0 }, - { "CLRImageType", "CLRIMAGETYPE:SAFE", "Force Safe IL Image", - "ForceSafeILImage", 0 }, - { "CLRImageType", "", "Default image type", "Default", 0 }, - - { "SignHash", "CLRSIGNHASH:SHA1", "SHA1", "SHA1", 0 }, - { "SignHash", "CLRSIGNHASH:SHA256", "SHA256", "SHA256", 0 }, - { "SignHash", "CLRSIGNHASH:SHA384", "SHA384", "SHA384", 0 }, - { "SignHash", "CLRSIGNHASH:SHA512", "SHA512", "SHA512", 0 }, - - { "LinkErrorReporting", "ERRORREPORT:PROMPT", "PromptImmediately", - "PromptImmediately", 0 }, - { "LinkErrorReporting", "ERRORREPORT:QUEUE", "Queue For Next Login", - "QueueForNextLogin", 0 }, - { "LinkErrorReporting", "ERRORREPORT:SEND", "Send Error Report", - "SendErrorReport", 0 }, - { "LinkErrorReporting", "ERRORREPORT:NONE", "No Error Report", - "NoErrorReport", 0 }, - - { "CLRSupportLastError", "CLRSupportLastError", "Enabled", "Enabled", 0 }, - { "CLRSupportLastError", "CLRSupportLastError:NO", "Disabled", "Disabled", - 0 }, - { "CLRSupportLastError", "CLRSupportLastError:SYSTEMDLL", "System Dlls Only", - "SystemDlls", 0 }, - - { "LinkControlFlowGuard", "guard:cf", "Enable Security Check with Guard", - "Guard", 0 }, - - // Bool Properties - { "LinkIncremental", "INCREMENTAL:NO", "", "false", 0 }, - { "LinkIncremental", "INCREMENTAL", "", "true", 0 }, - { "SuppressStartupBanner", "NOLOGO", "", "true", 0 }, - { "LinkStatus", "LTCG:NOSTATUS", "", "false", 0 }, - { "LinkStatus", "LTCG:STATUS", "", "true", 0 }, - { "PreventDllBinding", "ALLOWBIND:NO", "", "false", 0 }, - { "PreventDllBinding", "ALLOWBIND", "", "true", 0 }, - { "TreatLinkerWarningAsErrors", "WX:NO", "", "false", 0 }, - { "TreatLinkerWarningAsErrors", "WX", "", "true", 0 }, - { "IgnoreAllDefaultLibraries", "NODEFAULTLIB", "", "true", 0 }, - { "GenerateManifest", "MANIFEST:NO", "", "false", 0 }, - { "GenerateManifest", "MANIFEST", "", "true", 0 }, - { "AllowIsolation", "ALLOWISOLATION:NO", "", "false", 0 }, - { "UACUIAccess", "uiAccess='false'", "", "false", 0 }, - { "UACUIAccess", "uiAccess='true'", "", "true", 0 }, - { "ManifestEmbed", "manifest:embed", "", "true", 0 }, - { "MapExports", "MAPINFO:EXPORTS", "", "true", 0 }, - { "AssemblyDebug", "ASSEMBLYDEBUG:DISABLE", "", "false", 0 }, - { "AssemblyDebug", "ASSEMBLYDEBUG", "", "true", 0 }, - { "LargeAddressAware", "LARGEADDRESSAWARE:NO", "", "false", 0 }, - { "LargeAddressAware", "LARGEADDRESSAWARE", "", "true", 0 }, - { "TerminalServerAware", "TSAWARE:NO", "", "false", 0 }, - { "TerminalServerAware", "TSAWARE", "", "true", 0 }, - { "SwapRunFromCD", "SWAPRUN:CD", "", "true", 0 }, - { "SwapRunFromNET", "SWAPRUN:NET", "", "true", 0 }, - { "OptimizeReferences", "OPT:NOREF", "", "false", 0 }, - { "OptimizeReferences", "OPT:REF", "", "true", 0 }, - { "EnableCOMDATFolding", "OPT:NOICF", "", "false", 0 }, - { "EnableCOMDATFolding", "OPT:ICF", "", "true", 0 }, - { "IgnoreEmbeddedIDL", "IGNOREIDL", "", "true", 0 }, - { "AppContainer", "APPCONTAINER", "", "true", 0 }, - { "WindowsMetadataLinkDelaySign", "WINMDDELAYSIGN:NO", "", "false", 0 }, - { "WindowsMetadataLinkDelaySign", "WINMDDELAYSIGN", "", "true", 0 }, - { "NoEntryPoint", "NOENTRY", "", "true", 0 }, - { "SetChecksum", "RELEASE", "", "true", 0 }, - { "RandomizedBaseAddress", "DYNAMICBASE:NO", "", "false", 0 }, - { "RandomizedBaseAddress", "DYNAMICBASE", "", "true", 0 }, - { "FixedBaseAddress", "FIXED:NO", "", "false", 0 }, - { "FixedBaseAddress", "FIXED", "", "true", 0 }, - { "DataExecutionPrevention", "NXCOMPAT:NO", "", "false", 0 }, - { "DataExecutionPrevention", "NXCOMPAT", "", "true", 0 }, - { "TurnOffAssemblyGeneration", "NOASSEMBLY", "", "true", 0 }, - { "SupportUnloadOfDelayLoadedDLL", "DELAY:UNLOAD", "", "true", 0 }, - { "SupportNobindOfDelayLoadedDLL", "DELAY:NOBIND", "", "true", 0 }, - { "Profile", "PROFILE", "", "true", 0 }, - { "LinkDelaySign", "DELAYSIGN:NO", "", "false", 0 }, - { "LinkDelaySign", "DELAYSIGN", "", "true", 0 }, - { "CLRUnmanagedCodeCheck", "CLRUNMANAGEDCODECHECK:NO", "", "false", 0 }, - { "CLRUnmanagedCodeCheck", "CLRUNMANAGEDCODECHECK", "", "true", 0 }, - { "DetectOneDefinitionRule", "ODR", "", "true", 0 }, - { "ImageHasSafeExceptionHandlers", "SAFESEH:NO", "", "false", 0 }, - { "ImageHasSafeExceptionHandlers", "SAFESEH", "", "true", 0 }, - { "LinkDLL", "DLL", "", "true", 0 }, - - // Bool Properties With Argument - { "EnableUAC", "MANIFESTUAC:NO", "", "false", 0 }, - { "EnableUAC", "MANIFESTUAC:", "", "true", - cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue }, - { "UACUIAccess", "MANIFESTUAC:", "Enable User Account Control (UAC)", "", - cmVS7FlagTable::UserValueRequired }, - { "GenerateMapFile", "MAP", "", "true", - cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue }, - { "MapFileName", "MAP:", "Generate Map File", "", - cmVS7FlagTable::UserValueRequired }, - - // String List Properties - { "AdditionalLibraryDirectories", "LIBPATH:", - "Additional Library Directories", "", - cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, - { "Natvis", "NATVIS:", "Natvis files", "", - cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, - // Skip [AdditionalDependencies] - no command line Switch. - { "IgnoreSpecificDefaultLibraries", "NODEFAULTLIB:", - "Ignore Specific Default Libraries", "", - cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, - { "AddModuleNamesToAssembly", "ASSEMBLYMODULE:", "Add Module to Assembly", - "", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, - { "EmbedManagedResourceFile", "ASSEMBLYRESOURCE:", - "Embed Managed Resource File", "", - cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, - { "ForceSymbolReferences", "INCLUDE:", "Force Symbol References", "", - cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, - { "DelayLoadDLLs", "DELAYLOAD:", "Delay Loaded Dlls", "", - cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, - { "AssemblyLinkResource", "ASSEMBLYLINKRESOURCE:", "Assembly Link Resource", - "", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, - { "AdditionalManifestDependencies", "MANIFESTDEPENDENCY:", - "Additional Manifest Dependencies", "", - cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, - { "ManifestInput", "manifestinput:", "Manifest Input", "", - cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable }, - - // String Properties - { "OutputFile", "OUT:", "Output File", "", cmVS7FlagTable::UserValue }, - { "Version", "VERSION:", "Version", "", cmVS7FlagTable::UserValue }, - { "SpecifySectionAttributes", "SECTION:", "Specify Section Attributes", "", - cmVS7FlagTable::UserValue }, - { "MSDOSStubFileName", "STUB:", "MS-DOS Stub File Name", "", - cmVS7FlagTable::UserValue }, - // Skip [TrackerLogDirectory] - no command line Switch. - { "ModuleDefinitionFile", "DEF:", "Module Definition File", "", - cmVS7FlagTable::UserValue }, - { "ManifestFile", "ManifestFile:", "Manifest File", "", - cmVS7FlagTable::UserValue }, - { "ProgramDatabaseFile", "PDB:", "Generate Program Database File", "", - cmVS7FlagTable::UserValue }, - { "StripPrivateSymbols", "PDBSTRIPPED:", "Strip Private Symbols", "", - cmVS7FlagTable::UserValue }, - // Skip [MapFileName] - no command line Switch. - // Skip [MinimumRequiredVersion] - no command line Switch. - { "HeapReserveSize", "HEAP:", "Heap Reserve Size", "", - cmVS7FlagTable::UserValue }, - // Skip [HeapCommitSize] - no command line Switch. - { "StackReserveSize", "STACK:", "Stack Reserve Size", "", - cmVS7FlagTable::UserValue }, - // Skip [StackCommitSize] - no command line Switch. - { "FunctionOrder", "ORDER:@", "Function Order", "", - cmVS7FlagTable::UserValue }, - { "ProfileGuidedDatabase", "PGD:", "Profile Guided Database", "", - cmVS7FlagTable::UserValue }, - { "MidlCommandFile", "MIDL:@", "MIDL Commands", "", - cmVS7FlagTable::UserValue }, - { "MergedIDLBaseFileName", "IDLOUT:", "Merged IDL Base File Name", "", - cmVS7FlagTable::UserValue }, - { "TypeLibraryFile", "TLBOUT:", "Type Library", "", - cmVS7FlagTable::UserValue }, - { "WindowsMetadataFile", "WINMDFILE:", "Windows Metadata File", "", - cmVS7FlagTable::UserValue }, - { "WindowsMetadataLinkKeyFile", "WINMDKEYFILE:", "Windows Metadata Key File", - "", cmVS7FlagTable::UserValue }, - { "WindowsMetadataKeyContainer", "WINMDKEYCONTAINER:", - "Windows Metadata Key Container", "", cmVS7FlagTable::UserValue }, - { "EntryPointSymbol", "ENTRY:", "Entry Point", "", - cmVS7FlagTable::UserValue }, - { "BaseAddress", "BASE:", "Base Address", "", cmVS7FlagTable::UserValue }, - { "ImportLibrary", "IMPLIB:", "Import Library", "", - cmVS7FlagTable::UserValue }, - { "MergeSections", "MERGE:", "Merge Sections", "", - cmVS7FlagTable::UserValue }, - { "LinkKeyFile", "KEYFILE:", "Key File", "", cmVS7FlagTable::UserValue }, - { "KeyContainer", "KEYCONTAINER:", "Key Container", "", - cmVS7FlagTable::UserValue }, - // Skip [AdditionalOptions] - no command line Switch. - { 0, 0, 0, 0, 0 } -}; diff --git a/Source/cmVisualStudio10ToolsetOptions.cxx b/Source/cmVisualStudio10ToolsetOptions.cxx index afca216..9a1d950 100644 --- a/Source/cmVisualStudio10ToolsetOptions.cxx +++ b/Source/cmVisualStudio10ToolsetOptions.cxx @@ -26,10 +26,11 @@ #include "cmVS12RCFlagTable.h" #include "cmVS140CLFlagTable.h" #include "cmVS140CSharpFlagTable.h" +#include "cmVS140LinkFlagTable.h" #include "cmVS141CLFlagTable.h" #include "cmVS141CSharpFlagTable.h" +#include "cmVS141LinkFlagTable.h" #include "cmVS14LibFlagTable.h" -#include "cmVS14LinkFlagTable.h" #include "cmVS14MASMFlagTable.h" #include "cmVS14RCFlagTable.h" @@ -114,8 +115,10 @@ cmIDEFlagTable const* cmVisualStudio10ToolsetOptions::GetLinkFlagTable( { std::string const useToolset = this->GetToolsetName(name, toolset); - if ((useToolset == "v140") || (useToolset == "v141")) { - return cmVS14LinkFlagTable; + if (useToolset == "v141") { + return cmVS141LinkFlagTable; + } else if (useToolset == "v140") { + return cmVS140LinkFlagTable; } else if (useToolset == "v120") { return cmVS12LinkFlagTable; } else if (useToolset == "v110") { -- cgit v0.12 From 27bef1609b8e5aa7a5a8124d8bf3b5f652a163af Mon Sep 17 00:00:00 2001 From: Ian Hojnicki Date: Thu, 22 Jun 2017 16:37:05 -0500 Subject: VS: Fix GenerateDebugInformation flag map text for v141 toolsets Update the help text to match that from v141's link.xml file. --- Source/cmVS141LinkFlagTable.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/cmVS141LinkFlagTable.h b/Source/cmVS141LinkFlagTable.h index ec5dc2a..e707b90 100644 --- a/Source/cmVS141LinkFlagTable.h +++ b/Source/cmVS141LinkFlagTable.h @@ -36,9 +36,9 @@ static cmVS7FlagTable cmVS141LinkFlagTable[] = { "requireAdministrator", "RequireAdministrator", 0 }, { "GenerateDebugInformation", "DEBUG:FASTLINK", - "Optimize for faster linking", "DebugFastLink", + "Generate Debug Information optimized for faster links", "DebugFastLink", cmVS7FlagTable::CaseInsensitive }, - { "GenerateDebugInformation", "DEBUG", "Optimize for debugging", "Debug", + { "GenerateDebugInformation", "DEBUG", "Generate Debug Information", "Debug", cmVS7FlagTable::CaseInsensitive }, { "SubSystem", "", "Not Set", "NotSet", 0 }, -- cgit v0.12 From ae44496e2b2be3838af193c2ecfc7f3efaf1663a Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 27 Jun 2017 15:58:39 -0400 Subject: VS: Fix GenerateDebugInformation values for v140 and v141 toolsets When VS 2015 was first released, its new v140 toolset came with a `link.xml` file that changed the `GenerateDebugInformation` boolean (`false` and `true`) value from earlier toolsets to an enumeration consisting of the possible values `No`, `Debug`, and `DebugFastLink`. We first adapted to this in commit v3.4.2~2^2 (VS: Fix VS 2015 .vcxproj file value for GenerateDebugInformation, 2016-01-08), but that broke older toolsets that still expected the boolean. Then commit v3.6.0-rc1~295^2~1 (VS: Fix VS 2015 .vcxproj debug setting for older toolsets, 2016-02-24) added a hack to fix up the value based on the toolset in use. Several follow-up commits fixed this for more older toolsets because our flag table was at the time based on the generator in use rather than the toolset in use. Since commit v3.8.0-rc1~396^2 (VS: Choose flag map based on the toolset name, 2016-10-17) we use a flag table based on the toolset, so the fixup hack should not be needed. We had to keep it around only due to our default value for GenerateDebugInformation (`false` or `No`) still being based on the generator instead of the toolset. A VS 2015 update was released that changed the v140 toolset `link.xml` file back to using `false` and `true` for the `GenerateDebugInformation` enumeration variants previously known as `No` and `Debug`. In order to know which pair to use, we need to parse the `link.xml` file for the current toolset. Switch back to using `false` and `true` unconditionally in our `GenerateDebugInformation` flag table entries and default value. With that plus the toolset-based flag table, we now get incorrect values for `GenerateDebugInformation` only when using a v140 toolset from an older VS 2015 installation. Detect this case by parsing `link.xml` and add special logic to convert `false` and `true` to `No` and `Debug` to satisfy the older toolset specification. Inspired-by: Ian Hojnicki Fixes: #17020 --- Source/cmGlobalVisualStudio10Generator.cxx | 19 +++++++++++++++ Source/cmGlobalVisualStudio10Generator.h | 9 ++++++++ Source/cmVS140LinkFlagTable.h | 2 +- Source/cmVS141LinkFlagTable.h | 2 +- Source/cmVisualStudio10TargetGenerator.cxx | 37 ++++++++---------------------- 5 files changed, 39 insertions(+), 30 deletions(-) diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 0e02b0a..e3835ff 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -130,6 +130,7 @@ cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator( this->DefaultNasmFlagTable = cmVS10NASMFlagTable; this->DefaultRcFlagTable = cmVS10RCFlagTable; this->Version = VS10; + this->PlatformToolsetNeedsDebugEnum = false; } bool cmGlobalVisualStudio10Generator::MatchesGeneratorName( @@ -195,6 +196,24 @@ bool cmGlobalVisualStudio10Generator::SetGeneratorToolset( return false; } + if (cmHasLiteralPrefix(this->GetPlatformToolsetString(), "v140")) { + // The GenerateDebugInformation link setting for the v140 toolset + // in VS 2015 was originally an enum with "No" and "Debug" values, + // differing from the "false" and "true" values used in older toolsets. + // A VS 2015 update changed it back. Parse the "link.xml" file to + // discover which one we need. + std::string const link_xml = this->VCTargetsPath + "/1033/link.xml"; + cmsys::ifstream fin(link_xml.c_str()); + std::string line; + while (fin && cmSystemTools::GetLineFromStream(fin, line)) { + if (line.find(" Switch=\"DEBUG\" ") != std::string::npos) { + this->PlatformToolsetNeedsDebugEnum = + line.find(" Name=\"Debug\" ") != std::string::npos; + break; + } + } + } + if (this->GeneratorToolsetCuda.empty()) { // Find the highest available version of the CUDA tools. std::vector cudaTools; diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 20f992a..4a5c245 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -59,6 +59,13 @@ public: const char* GetPlatformToolsetCuda() const; std::string const& GetPlatformToolsetCudaString() const; + /** Return whether we need to use No/Debug instead of false/true + for GenerateDebugInformation. */ + bool GetPlatformToolsetNeedsDebugEnum() const + { + return this->PlatformToolsetNeedsDebugEnum; + } + /** Return the CMAKE_SYSTEM_NAME. */ std::string const& GetSystemName() const { return this->SystemName; } @@ -169,6 +176,8 @@ private: virtual std::string FindDevEnvCommand(); virtual std::string GetVSMakeProgram() { return this->GetMSBuildCommand(); } + bool PlatformToolsetNeedsDebugEnum; + bool ParseGeneratorToolset(std::string const& ts, cmMakefile* mf); std::string VCTargetsPath; diff --git a/Source/cmVS140LinkFlagTable.h b/Source/cmVS140LinkFlagTable.h index 618087a..613541c 100644 --- a/Source/cmVS140LinkFlagTable.h +++ b/Source/cmVS140LinkFlagTable.h @@ -38,7 +38,7 @@ static cmVS7FlagTable cmVS140LinkFlagTable[] = { { "GenerateDebugInformation", "DEBUG:FASTLINK", "Optimize for faster linking", "DebugFastLink", cmVS7FlagTable::CaseInsensitive }, - { "GenerateDebugInformation", "DEBUG", "Optimize for debugging", "Debug", + { "GenerateDebugInformation", "DEBUG", "Optimize for debugging", "true", cmVS7FlagTable::CaseInsensitive }, { "SubSystem", "", "Not Set", "NotSet", 0 }, diff --git a/Source/cmVS141LinkFlagTable.h b/Source/cmVS141LinkFlagTable.h index e707b90..ff0c1da 100644 --- a/Source/cmVS141LinkFlagTable.h +++ b/Source/cmVS141LinkFlagTable.h @@ -38,7 +38,7 @@ static cmVS7FlagTable cmVS141LinkFlagTable[] = { { "GenerateDebugInformation", "DEBUG:FASTLINK", "Generate Debug Information optimized for faster links", "DebugFastLink", cmVS7FlagTable::CaseInsensitive }, - { "GenerateDebugInformation", "DEBUG", "Generate Debug Information", "Debug", + { "GenerateDebugInformation", "DEBUG", "Generate Debug Information", "true", cmVS7FlagTable::CaseInsensitive }, { "SubSystem", "", "Not Set", "NotSet", 0 }, diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index de1f5b0..88fa19c 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -17,8 +17,6 @@ #include "cm_auto_ptr.hxx" -static std::string const kWINDOWS_7_1_SDK = "Windows7.1SDK"; - static std::string cmVS10EscapeXML(std::string arg) { cmSystemTools::ReplaceString(arg, "&", "&"); @@ -3130,12 +3128,7 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( linkOptions.AddFlag("StackReserveSize", stackVal); } - if (this->LocalGenerator->GetVersion() >= - cmGlobalVisualStudioGenerator::VS14) { - linkOptions.AddFlag("GenerateDebugInformation", "No"); - } else { - linkOptions.AddFlag("GenerateDebugInformation", "false"); - } + linkOptions.AddFlag("GenerateDebugInformation", "false"); std::string pdb = this->GeneratorTarget->GetPDBDirectory(config.c_str()); pdb += "/"; @@ -3182,26 +3175,14 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( "%(IgnoreSpecificDefaultLibraries)"); } - // Hack to fix flag version selection in a common use case. - // FIXME: Select flag table based on toolset instead of VS version. - if (this->LocalGenerator->GetVersion() >= - cmGlobalVisualStudioGenerator::VS14) { - const char* toolset = gg->GetPlatformToolset(); - if (toolset && - (toolset == kWINDOWS_7_1_SDK || /* clang-format please break here */ - cmHasLiteralPrefix(toolset, "v80") || - cmHasLiteralPrefix(toolset, "v90") || - cmHasLiteralPrefix(toolset, "v100") || - cmHasLiteralPrefix(toolset, "v110") || - cmHasLiteralPrefix(toolset, "v120"))) { - if (const char* debug = - linkOptions.GetFlag("GenerateDebugInformation")) { - // Convert value from enumeration back to boolean for older toolsets. - if (strcmp(debug, "No") == 0) { - linkOptions.AddFlag("GenerateDebugInformation", "false"); - } else if (strcmp(debug, "Debug") == 0) { - linkOptions.AddFlag("GenerateDebugInformation", "true"); - } + // VS 2015 without all updates has a v140 toolset whose + // GenerateDebugInformation expects No/Debug instead of false/true. + if (gg->GetPlatformToolsetNeedsDebugEnum()) { + if (const char* debug = linkOptions.GetFlag("GenerateDebugInformation")) { + if (strcmp(debug, "false") == 0) { + linkOptions.AddFlag("GenerateDebugInformation", "No"); + } else if (strcmp(debug, "true") == 0) { + linkOptions.AddFlag("GenerateDebugInformation", "Debug"); } } } -- cgit v0.12 From 7ba27e364fcf6a941590600d7fb1d304bd462e05 Mon Sep 17 00:00:00 2001 From: Ian Hojnicki Date: Thu, 22 Jun 2017 16:37:05 -0500 Subject: VS: Add v140 and v141 flag table entries for /DEBUG:NONE and /DEBUG:FULL --- Source/cmVS140LinkFlagTable.h | 5 +++++ Source/cmVS141LinkFlagTable.h | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/Source/cmVS140LinkFlagTable.h b/Source/cmVS140LinkFlagTable.h index 613541c..ceb1d78 100644 --- a/Source/cmVS140LinkFlagTable.h +++ b/Source/cmVS140LinkFlagTable.h @@ -38,6 +38,11 @@ static cmVS7FlagTable cmVS140LinkFlagTable[] = { { "GenerateDebugInformation", "DEBUG:FASTLINK", "Optimize for faster linking", "DebugFastLink", cmVS7FlagTable::CaseInsensitive }, + { "GenerateDebugInformation", "DEBUG:FULL", "Optimize for debugging", "true", + cmVS7FlagTable::CaseInsensitive }, + { "GenerateDebugInformation", "DEBUG:NONE", + "Produces no debugging information", "false", + cmVS7FlagTable::CaseInsensitive }, { "GenerateDebugInformation", "DEBUG", "Optimize for debugging", "true", cmVS7FlagTable::CaseInsensitive }, diff --git a/Source/cmVS141LinkFlagTable.h b/Source/cmVS141LinkFlagTable.h index ff0c1da..d7faf81 100644 --- a/Source/cmVS141LinkFlagTable.h +++ b/Source/cmVS141LinkFlagTable.h @@ -38,6 +38,12 @@ static cmVS7FlagTable cmVS141LinkFlagTable[] = { { "GenerateDebugInformation", "DEBUG:FASTLINK", "Generate Debug Information optimized for faster links", "DebugFastLink", cmVS7FlagTable::CaseInsensitive }, + { "GenerateDebugInformation", "DEBUG:FULL", + "Generate Debug Information optimized for sharing and publishing", + "DebugFull", cmVS7FlagTable::CaseInsensitive }, + { "GenerateDebugInformation", "DEBUG:NONE", + "Produces no debugging information", "false", + cmVS7FlagTable::CaseInsensitive }, { "GenerateDebugInformation", "DEBUG", "Generate Debug Information", "true", cmVS7FlagTable::CaseInsensitive }, -- cgit v0.12