mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
cmLocalGenerator: Drop no-op link flag placeholder infrastructure
Revert infrastructure from commit 8bcf9c7a3e
(Add support of "LINKER:"
prefix for artifact creation flags, 2024-10-12, v4.0.0-rc1~522^2~1).
It is not needed to populate legacy placeholders with empty strings.
This commit is contained in:
@@ -228,15 +228,6 @@ cmLocalGenerator::CreateRulePlaceholderExpander(cmBuildStep buildStep) const
|
||||
buildStep, this->Compilers, this->VariableMappings, this->CompilerSysroot,
|
||||
this->LinkerSysroot);
|
||||
}
|
||||
std::unique_ptr<cmRulePlaceholderExpander>
|
||||
cmLocalGenerator::CreateRulePlaceholderExpander(
|
||||
cmBuildStep buildStep, cmGeneratorTarget const* target,
|
||||
std::string const& language)
|
||||
{
|
||||
static_cast<void>(target);
|
||||
static_cast<void>(language);
|
||||
return this->CreateRulePlaceholderExpander(buildStep);
|
||||
}
|
||||
|
||||
cmLocalGenerator::~cmLocalGenerator() = default;
|
||||
|
||||
|
@@ -115,10 +115,6 @@ public:
|
||||
virtual std::unique_ptr<cmRulePlaceholderExpander>
|
||||
CreateRulePlaceholderExpander(
|
||||
cmBuildStep buildStep = cmBuildStep::Compile) const;
|
||||
virtual std::unique_ptr<cmRulePlaceholderExpander>
|
||||
CreateRulePlaceholderExpander(cmBuildStep buildStep,
|
||||
cmGeneratorTarget const* target,
|
||||
std::string const& language);
|
||||
|
||||
std::string GetExeExportFlags(std::string const& linkLanguage,
|
||||
cmGeneratorTarget& tgt) const;
|
||||
|
@@ -57,16 +57,6 @@ cmLocalNinjaGenerator::CreateRulePlaceholderExpander(
|
||||
ret->SetTargetImpLib("$TARGET_IMPLIB");
|
||||
return std::unique_ptr<cmRulePlaceholderExpander>(std::move(ret));
|
||||
}
|
||||
std::unique_ptr<cmRulePlaceholderExpander>
|
||||
cmLocalNinjaGenerator::CreateRulePlaceholderExpander(
|
||||
cmBuildStep buildStep, cmGeneratorTarget const* target,
|
||||
std::string const& language)
|
||||
{
|
||||
auto ret = this->cmLocalGenerator::CreateRulePlaceholderExpander(
|
||||
buildStep, target, language);
|
||||
ret->SetTargetImpLib("$TARGET_IMPLIB");
|
||||
return std::unique_ptr<cmRulePlaceholderExpander>(std::move(ret));
|
||||
}
|
||||
|
||||
cmLocalNinjaGenerator::~cmLocalNinjaGenerator() = default;
|
||||
|
||||
|
@@ -45,9 +45,6 @@ public:
|
||||
|
||||
std::unique_ptr<cmRulePlaceholderExpander> CreateRulePlaceholderExpander(
|
||||
cmBuildStep buildStep = cmBuildStep::Compile) const override;
|
||||
std::unique_ptr<cmRulePlaceholderExpander> CreateRulePlaceholderExpander(
|
||||
cmBuildStep buildStep, cmGeneratorTarget const* target,
|
||||
std::string const& language) override;
|
||||
|
||||
cmGlobalNinjaGenerator const* GetGlobalNinjaGenerator() const;
|
||||
cmGlobalNinjaGenerator* GetGlobalNinjaGenerator();
|
||||
|
@@ -234,8 +234,7 @@ void cmMakefileExecutableTargetGenerator::WriteNvidiaDeviceExecutableRule(
|
||||
}
|
||||
|
||||
auto rulePlaceholderExpander =
|
||||
this->LocalGenerator->CreateRulePlaceholderExpander(
|
||||
cmBuildStep::Link, this->GeneratorTarget, linkLanguage);
|
||||
this->LocalGenerator->CreateRulePlaceholderExpander(cmBuildStep::Link);
|
||||
|
||||
// Expand placeholders in the commands.
|
||||
rulePlaceholderExpander->SetTargetImpLib(targetOutput);
|
||||
@@ -610,8 +609,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
|
||||
}
|
||||
|
||||
auto rulePlaceholderExpander =
|
||||
this->LocalGenerator->CreateRulePlaceholderExpander(
|
||||
cmBuildStep::Link, this->GeneratorTarget, linkLanguage);
|
||||
this->LocalGenerator->CreateRulePlaceholderExpander(cmBuildStep::Link);
|
||||
|
||||
// Expand placeholders in the commands.
|
||||
rulePlaceholderExpander->SetTargetImpLib(targetOutPathImport);
|
||||
|
@@ -392,8 +392,7 @@ void cmMakefileLibraryTargetGenerator::WriteNvidiaDeviceLibraryRules(
|
||||
}
|
||||
|
||||
auto rulePlaceholderExpander =
|
||||
this->LocalGenerator->CreateRulePlaceholderExpander(
|
||||
cmBuildStep::Link, this->GeneratorTarget, linkLanguage);
|
||||
this->LocalGenerator->CreateRulePlaceholderExpander(cmBuildStep::Link);
|
||||
|
||||
// Construct the main link rule and expand placeholders.
|
||||
rulePlaceholderExpander->SetTargetImpLib(targetOutput);
|
||||
@@ -718,8 +717,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
|
||||
|
||||
// Expand the rule variables.
|
||||
auto rulePlaceholderExpander =
|
||||
this->LocalGenerator->CreateRulePlaceholderExpander(
|
||||
cmBuildStep::Link, this->GeneratorTarget, linkLanguage);
|
||||
this->LocalGenerator->CreateRulePlaceholderExpander(cmBuildStep::Link);
|
||||
bool useWatcomQuote =
|
||||
this->Makefile->IsOn(linkRuleVar + "_USE_WATCOM_QUOTE");
|
||||
cmList real_link_commands;
|
||||
|
@@ -1714,8 +1714,8 @@ void cmMakefileTargetGenerator::WriteDeviceLinkRule(
|
||||
vars.Flags = flags.c_str();
|
||||
|
||||
std::string compileCmd = this->GetLinkRule("CMAKE_CUDA_DEVICE_LINK_COMPILE");
|
||||
auto rulePlaceholderExpander = localGen->CreateRulePlaceholderExpander(
|
||||
cmBuildStep::Link, this->GetGeneratorTarget(), "CUDA");
|
||||
auto rulePlaceholderExpander =
|
||||
localGen->CreateRulePlaceholderExpander(cmBuildStep::Link);
|
||||
rulePlaceholderExpander->ExpandRuleVariables(localGen, compileCmd, vars);
|
||||
|
||||
commands.emplace_back(compileCmd);
|
||||
|
@@ -356,8 +356,7 @@ void cmNinjaNormalTargetGenerator::WriteNvidiaDeviceLinkRule(
|
||||
|
||||
auto rulePlaceholderExpander =
|
||||
this->GetLocalGenerator()->CreateRulePlaceholderExpander(
|
||||
cmBuildStep::Link, this->GetGeneratorTarget(),
|
||||
this->TargetLinkLanguage(config));
|
||||
cmBuildStep::Link);
|
||||
|
||||
// Rule for linking library/executable.
|
||||
std::vector<std::string> linkCmds = this->ComputeDeviceLinkCmd();
|
||||
@@ -424,8 +423,7 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkRules(
|
||||
"CMAKE_CUDA_DEVICE_LINK_COMPILE");
|
||||
auto rulePlaceholderExpander =
|
||||
this->GetLocalGenerator()->CreateRulePlaceholderExpander(
|
||||
cmBuildStep::Link, this->GetGeneratorTarget(),
|
||||
this->TargetLinkLanguage(config));
|
||||
cmBuildStep::Link);
|
||||
rulePlaceholderExpander->ExpandRuleVariables(this->GetLocalGenerator(),
|
||||
compileCmd, vars);
|
||||
|
||||
@@ -584,8 +582,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(
|
||||
|
||||
auto rulePlaceholderExpander =
|
||||
this->GetLocalGenerator()->CreateRulePlaceholderExpander(
|
||||
cmBuildStep::Link, this->GetGeneratorTarget(),
|
||||
this->TargetLinkLanguage(config));
|
||||
cmBuildStep::Link);
|
||||
|
||||
// Rule for linking library/executable.
|
||||
std::vector<std::string> linkCmds = this->ComputeLinkCmd(config);
|
||||
|
Reference in New Issue
Block a user