diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-11-14 18:54:06 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-11-17 11:06:50 +0100 |
commit | 096c7e889f3b9bd42a81fb0216e2a68fb27159fc (patch) | |
tree | 22bf2ebadd3a820483cbeb43291d6fb45ab52fe8 /solenv/gbuild/StaticLibrary.mk | |
parent | 4213b9b38bd6cd498961536b82edcf9236c2f5f2 (diff) |
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
Diffstat (limited to 'solenv/gbuild/StaticLibrary.mk')
-rw-r--r-- | solenv/gbuild/StaticLibrary.mk | 12 |
1 files changed, 12 insertions, 0 deletions
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)) |