diff options
author | Ruslan Baratov <ruslan_baratov@yahoo.com> | 2017-04-27 13:18:26 (GMT) |
---|---|---|
committer | Ruslan Baratov <ruslan_baratov@yahoo.com> | 2017-05-02 15:33:25 (GMT) |
commit | 7e75568b001e29a7428d7489c57cebd909359571 (patch) | |
tree | 19631d949a74b59572214900a6e9afa8d42b0012 /Source/cmGlobalXCodeGenerator.cxx | |
parent | e80e8eb609cc7dd8c4dca46b9c2819afd2293229 (diff) | |
download | CMake-7e75568b001e29a7428d7489c57cebd909359571.zip CMake-7e75568b001e29a7428d7489c57cebd909359571.tar.gz CMake-7e75568b001e29a7428d7489c57cebd909359571.tar.bz2 |
Xcode: Support IPO (LTO)
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index d99e3bb..95c1236 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1683,8 +1683,11 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, return; } - // Check IPO related warning/error. - gtgt->IsIPOEnabled(configName); + if (gtgt->IsIPOEnabled(configName)) { + const char* ltoValue = + this->CurrentMakefile->IsOn("_CMAKE_LTO_THIN") ? "YES_THIN" : "YES"; + buildSettings->AddAttribute("LLVM_LTO", this->CreateString(ltoValue)); + } // Add define flags this->CurrentLocalGenerator->AppendFlags( |