Skip to content

Commit

Permalink
kbuild: compile-test kernel headers to ensure they are self-contained
Browse files Browse the repository at this point in the history
The headers in include/ are globally used in the kernel source tree
to provide common APIs. They are included from external modules, too.

It will be useful to make as many headers self-contained as possible
so that we do not have to rely on a specific include order.

There are more than 4000 headers in include/. In my rough analysis,
70% of them are already self-contained. With efforts, most of them
can be self-contained.

For now, we must exclude more than 1000 headers just because they
cannot be compiled as standalone units. I added them to header-test-.
The blacklist was mostly generated by a script, so the reason of the
breakage should be checked later.

Signed-off-by: Masahiro Yamada <[email protected]>
Tested-by: Jani Nikula <[email protected]>
Reviewed-by: Joel Fernandes (Google) <[email protected]>
  • Loading branch information
masahir0y committed Jul 9, 2019
1 parent 7199ff7 commit 43c78d8
Show file tree
Hide file tree
Showing 3 changed files with 1,282 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ ifeq ($(KBUILD_EXTMOD),)
init-y := init/
drivers-y := drivers/ sound/
drivers-$(CONFIG_SAMPLES) += samples/
drivers-$(CONFIG_KERNEL_HEADER_TEST) += include/
net-y := net/
libs-y := lib/
core-y := usr/
Expand Down
Loading

0 comments on commit 43c78d8

Please sign in to comment.