summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx7
-rw-r--r--Source/cmGlobalXCodeGenerator.h2
2 files changed, 7 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(
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index ee06074..a5d169f 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -90,6 +90,8 @@ public:
bool HasKnownObjectFileLocation(std::string* reason) const CM_OVERRIDE;
+ bool IsIPOSupported() const CM_OVERRIDE { return true; }
+
bool UseEffectivePlatformName(cmMakefile* mf) const CM_OVERRIDE;
bool ShouldStripResourcePath(cmMakefile*) const CM_OVERRIDE;