Makefiles: Add LINK_WHAT_YOU_USE support for MODULE libraries

This was accidentally left out by Makefile generators.
It already works with Ninja.

Fixes: #25480
This commit is contained in:
Peter Kokot
2023-12-06 09:03:24 +01:00
committed by Brad King
parent 98cbe24918
commit 6b85c71ad8

View File

@@ -218,6 +218,9 @@ void cmMakefileLibraryTargetGenerator::WriteModuleLibraryRules(bool relink)
extraFlags, this->GeneratorTarget, linkLineComputer.get(),
this->GetConfigName());
this->UseLWYU = this->LocalGenerator->AppendLWYUFlags(
extraFlags, this->GeneratorTarget, linkLanguage);
this->WriteLibraryRules(linkRuleVar, extraFlags, relink);
}