mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 11:50:11 -05:00
IPO: Consider support for each language separately
We only define `INTERPROCEDURAL_OPTIMIZATION` behavior for C, CXX, and Fortran languages. Do not try to enable support for other languages. Furthermore, each language builds with a different compiler, so check for support by CMake and the compiler for each language independently. Fixes: #16944
This commit is contained in:
@@ -1666,7 +1666,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
|
||||
return;
|
||||
}
|
||||
|
||||
if (gtgt->IsIPOEnabled(configName)) {
|
||||
if (gtgt->IsIPOEnabled(llang, configName)) {
|
||||
const char* ltoValue =
|
||||
this->CurrentMakefile->IsOn("_CMAKE_LTO_THIN") ? "YES_THIN" : "YES";
|
||||
buildSettings->AddAttribute("LLVM_LTO", this->CreateString(ltoValue));
|
||||
|
||||
Reference in New Issue
Block a user