diff options
author | Ruslan Baratov <ruslan_baratov@yahoo.com> | 2017-03-28 06:47:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-03-30 18:56:52 (GMT) |
commit | dfa8263f4be4f1413b73c81649fdc4567a71e56a (patch) | |
tree | 23e540d2dcb39793a0f9ef503e392fb854beb985 /Source/cmNinjaNormalTargetGenerator.cxx | |
parent | 1588a577d16cfb1a689a444b1db1df3ccff2cc3d (diff) | |
download | CMake-dfa8263f4be4f1413b73c81649fdc4567a71e56a.zip CMake-dfa8263f4be4f1413b73c81649fdc4567a71e56a.tar.gz CMake-dfa8263f4be4f1413b73c81649fdc4567a71e56a.tar.bz2 |
Implement interprocedural optimization for GNU compilers
Honor the `INTERPROCEDURAL_OPTIMIZATION` target property for GNU
compilers by activating their link-time-optimization (LTO) flags.
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r-- | Source/cmNinjaNormalTargetGenerator.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 5552fa9..eac3ecf 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -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); } |