VS10: Honor /DELAYSIGN and /KEYFILE flags (#13601)

Fix the VS 10 link flag map to name the project file entries correctly.
The VS 11 link flag map already has the correct names.  Generate the
entries in the <PropertyGroup> along with incremental linking options.
Drop them from the <Link> element because VS does not use them.
This commit is contained in:
Brad King 2012-10-26 11:02:42 -04:00
parent c65a2ea6a8
commit 035e7bd04e
2 changed files with 20 additions and 3 deletions

View File

@ -182,8 +182,8 @@ static cmVS7FlagTable cmVS10LinkFlagTable[] =
{"SupportUnloadOfDelayLoadedDLL", "DELAY:UNLOAD", "", "true", 0}, {"SupportUnloadOfDelayLoadedDLL", "DELAY:UNLOAD", "", "true", 0},
{"SupportNobindOfDelayLoadedDLL", "DELAY:NOBIND", "", "true", 0}, {"SupportNobindOfDelayLoadedDLL", "DELAY:NOBIND", "", "true", 0},
{"Profile", "PROFILE", "", "true", 0}, {"Profile", "PROFILE", "", "true", 0},
{"DelaySign", "DELAYSIGN:NO", "", "false", 0}, {"LinkDelaySign", "DELAYSIGN:NO", "", "false", 0},
{"DelaySign", "DELAYSIGN", "", "true", 0}, {"LinkDelaySign", "DELAYSIGN", "", "true", 0},
{"CLRUnmanagedCodeCheck", "CLRUNMANAGEDCODECHECK:NO", "", "false", 0}, {"CLRUnmanagedCodeCheck", "CLRUNMANAGEDCODECHECK:NO", "", "false", 0},
{"CLRUnmanagedCodeCheck", "CLRUNMANAGEDCODECHECK", "", "true", 0}, {"CLRUnmanagedCodeCheck", "CLRUNMANAGEDCODECHECK", "", "true", 0},
{"ImageHasSafeExceptionHandlers", "SAFESEH:NO", "", "false", 0}, {"ImageHasSafeExceptionHandlers", "SAFESEH:NO", "", "false", 0},
@ -294,7 +294,7 @@ static cmVS7FlagTable cmVS10LinkFlagTable[] =
{"MergeSections", "MERGE:", {"MergeSections", "MERGE:",
"Merge Sections", "Merge Sections",
"", cmVS7FlagTable::UserValue}, "", cmVS7FlagTable::UserValue},
{"KeyFile", "KEYFILE:", {"LinkKeyFile", "KEYFILE:",
"Key File", "Key File",
"", cmVS7FlagTable::UserValue}, "", cmVS7FlagTable::UserValue},
{"KeyContainer", "KEYCONTAINER:", {"KeyContainer", "KEYCONTAINER:",

View File

@ -1106,6 +1106,23 @@ OutputLinkIncremental(std::string const& configName)
*this->BuildFileStream << (manifest?manifest:"true") *this->BuildFileStream << (manifest?manifest:"true")
<< "</GenerateManifest>\n"; << "</GenerateManifest>\n";
linkOptions.RemoveFlag("GenerateManifest"); linkOptions.RemoveFlag("GenerateManifest");
// Some link options belong here. Use them now and remove them so that
// WriteLinkOptions does not use them.
const char* flags[] = {
"LinkDelaySign",
"LinkKeyFile",
0};
for(const char** f = flags; *f; ++f)
{
const char* flag = *f;
if(const char* value = linkOptions.GetFlag(flag))
{
this->WritePlatformConfigTag(flag, configName.c_str(), 3);
*this->BuildFileStream << value << "</" << flag << ">\n";
linkOptions.RemoveFlag(flag);
}
}
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------