mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 03:39:43 -06:00
fileapi: Do not expose flags for linker-generated dependencies
In commit 375e6fdbbe (Link step: use linker dependency linker file,
2023-04-19, v3.27.0-rc1~126^2) we added the `-Wl,--dependency-file,...`
flag for the Ninja generator in a code path shared with the file-api.
This flag is a build system implementation detail and should not be
exposed to file-api clients. Move it to a Ninja-specific code path.
Fixes: #26498
This commit is contained in:
@@ -1626,8 +1626,6 @@ void cmLocalGenerator::GetTargetFlags(
|
||||
this->AppendPositionIndependentLinkerFlags(extraLinkFlags, target, config,
|
||||
linkLanguage);
|
||||
this->AppendIPOLinkerFlags(extraLinkFlags, target, config, linkLanguage);
|
||||
this->AppendDependencyInfoLinkerFlags(extraLinkFlags, target, config,
|
||||
linkLanguage);
|
||||
this->AppendModuleDefinitionFlag(extraLinkFlags, target, linkLineComputer,
|
||||
config);
|
||||
|
||||
|
||||
@@ -1277,6 +1277,9 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement(
|
||||
vars["LINK_LIBRARIES"], vars["FLAGS"],
|
||||
vars["LINK_FLAGS"], frameworkPath, linkPath, gt);
|
||||
|
||||
localGen.AppendDependencyInfoLinkerFlags(vars["LINK_FLAGS"], gt, config,
|
||||
this->TargetLinkLanguage(config));
|
||||
|
||||
// Add OS X version flags, if any.
|
||||
if (this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY ||
|
||||
this->GeneratorTarget->GetType() == cmStateEnums::MODULE_LIBRARY) {
|
||||
|
||||
Reference in New Issue
Block a user