summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmLocalGenerator.cxx18
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx3
2 files changed, 2 insertions, 19 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 15563fe..7928a46 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1448,22 +1448,6 @@ void cmLocalGenerator::GetTargetFlags(
sharedLibFlags += this->Makefile->GetSafeDefinition(build);
sharedLibFlags += " ";
}
- if (this->Makefile->IsOn("WIN32") &&
- !(this->Makefile->IsOn("CYGWIN") ||
- this->Makefile->IsOn("MINGW"))) {
- std::vector<cmSourceFile*> sources;
- target->GetSourceFiles(sources, config);
- std::string defFlag =
- this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG");
- for (cmSourceFile* sf : sources) {
- if (sf->GetExtension() == "def") {
- sharedLibFlags += defFlag;
- sharedLibFlags +=
- this->ConvertToOutputFormat(sf->ResolveFullPath(), SHELL);
- sharedLibFlags += " ";
- }
- }
- }
}
cmValue targetLinkFlags = target->GetProperty("LINK_FLAGS");
@@ -1577,6 +1561,8 @@ void cmLocalGenerator::GetTargetFlags(
this->AppendPositionIndependentLinkerFlags(extraLinkFlags, target, config,
linkLanguage);
this->AppendIPOLinkerFlags(extraLinkFlags, target, config, linkLanguage);
+ this->AppendModuleDefinitionFlag(extraLinkFlags, target, linkLineComputer,
+ config);
if (!extraLinkFlags.empty()) {
linkFlags.emplace_back(std::move(extraLinkFlags));
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 3426de9..d4f1608 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -1164,9 +1164,6 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement(
this->addPoolNinjaVariable("JOB_POOL_LINK", gt, vars);
- localGen.AppendModuleDefinitionFlag(vars["LINK_FLAGS"], gt,
- linkLineComputer.get(), config);
-
this->UseLWYU = this->GetLocalGenerator()->AppendLWYUFlags(
vars["LINK_FLAGS"], this->GetGeneratorTarget(),
this->TargetLinkLanguage(config));