From 096c7e889f3b9bd42a81fb0216e2a68fb27159fc Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 14 Nov 2014 18:54:06 +0100 Subject: add a script to generate a dummy library to "build" all headers ... to be used together --with-iwyu to track down bloat in headers, which are not always named in the convention that include-what-you-use expects for reporting issues. Change-Id: Idffda7d49cca43170717004d52779b4663de19ae --- solenv/gbuild/StaticLibrary.mk | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'solenv') diff --git a/solenv/gbuild/StaticLibrary.mk b/solenv/gbuild/StaticLibrary.mk index 39ba0fa49979..a78a781fe563 100644 --- a/solenv/gbuild/StaticLibrary.mk +++ b/solenv/gbuild/StaticLibrary.mk @@ -50,6 +50,18 @@ $(call gb_Helper_make_userfriendly_targets,$(1),StaticLibrary) endef +# this is a crude hack to "build" header files with include-what-you-use +define gb_StaticLibrary__add_iwyu_header +$(call gb_LinkTarget_get_target,$(call gb_StaticLibrary_get_linktarget,$(1))) : $(call gb_GenCxxObject_get_target,$(basename $(2))) +$(call gb_GenCxxObject_get_target,$(basename $(2))) : $(SRCDIR)/$(2) +$(call gb_GenCxxObject_get_target,$(basename $(2))) : WARNINGS_NOT_ERRORS := $(true) +$(call gb_GenCxxObject_get_target,$(basename $(2))) : GEN_CXX_SOURCE := $(SRCDIR)/$(2) + +endef +define gb_StaticLibrary__add_iwyu_headers +$(foreach file,$(2),$(call gb_StaticLibrary__add_iwyu_header,$(1),$(file))) +endef + define gb_StaticLibrary_forward_to_Linktarget gb_StaticLibrary_$(1) = $$(call gb_LinkTarget_$(1),$$(call gb_StaticLibrary_get_linktarget,$$(1)),$$(2),$$(3),StaticLibrary_$$(1)) -- cgit