From 6b85c71ad8abffa7ea915e5dde8a809a0a4c493f Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Wed, 6 Dec 2023 09:03:24 +0100 Subject: 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 --- Source/cmMakefileLibraryTargetGenerator.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 0429155..bc48a3b 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -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); } -- cgit v0.12