mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-02 20:29:49 -05:00
Implement interprocedural optimization for GNU compilers
Honor the `INTERPROCEDURAL_OPTIMIZATION` target property for GNU compilers by activating their link-time-optimization (LTO) flags.
This commit is contained in:
committed by
Brad King
parent
1588a577d1
commit
dfa8263f4b
@@ -516,6 +516,10 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeLinkCmd()
|
||||
std::string linkCmdVar = "CMAKE_";
|
||||
linkCmdVar += this->TargetLinkLanguage;
|
||||
linkCmdVar += "_ARCHIVE_CREATE";
|
||||
|
||||
linkCmdVar = this->GeneratorTarget->GetFeatureSpecificLinkRuleVariable(
|
||||
linkCmdVar, this->GetConfigName());
|
||||
|
||||
const char* linkCmd = mf->GetRequiredDefinition(linkCmdVar);
|
||||
cmSystemTools::ExpandListArgument(linkCmd, linkCmds);
|
||||
}
|
||||
@@ -523,6 +527,10 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeLinkCmd()
|
||||
std::string linkCmdVar = "CMAKE_";
|
||||
linkCmdVar += this->TargetLinkLanguage;
|
||||
linkCmdVar += "_ARCHIVE_FINISH";
|
||||
|
||||
linkCmdVar = this->GeneratorTarget->GetFeatureSpecificLinkRuleVariable(
|
||||
linkCmdVar, this->GetConfigName());
|
||||
|
||||
const char* linkCmd = mf->GetRequiredDefinition(linkCmdVar);
|
||||
cmSystemTools::ExpandListArgument(linkCmd, linkCmds);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user