Commit bb442dfe37 for qemu.org
commit bb442dfe375284b4c8b5208ad3859df45e0ffc36
Author: Peter Maydell <peter.maydell@linaro.org>
Date: Fri Jan 16 12:40:05 2026 +0000
scripts/clean-includes: Update exclude list
Remove from the exclude list:
* tests/plugin, which is a non-existent directory. This was
probably intended to exclude tests/tcg/plugins/, which is caught
by the tests/tcg exclude pattern anyway
Add to the exclude list:
* rust/ -- the headers in here are purely for input to bindgen
* target/hexagon has some standalone tools used at build time
* linux-user/gen-vsdo.c -- another standalone tool
* linux-user/mips64/elfload.c just includes mips/elfload.c
* scripts/xen-detect.c is feature-detection code used by meson.build
* tests/tracetool/simple.c is autogenerated
* tests/unit/ has some "C file just includes another one" files
* include/system/os-wasm.h is like os-posix.h and os-win32.h and
shouldn't be adjusted
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20260116124005.925382-7-peter.maydell@linaro.org
diff --git a/scripts/clean-includes b/scripts/clean-includes
index 064e532037..874dfd0974 100755
--- a/scripts/clean-includes
+++ b/scripts/clean-includes
@@ -113,10 +113,12 @@ trap 'rm -f -- "$COCCIFILE" "$REGEXFILE"' INT TERM HUP EXIT
# Comments starting with '#' are permitted
grep -v '^#' >"$REGEXFILE" <<EOT
# These tests are generally standalone binaries
-^tests/(tcg|multiboot|fp|plugin|uefi-test-tools)
+^tests/(tcg|multiboot|fp|uefi-test-tools|qtest/migration/s390x)
# BIOS sources and third-party subprojects don't follow our rules
^pc-bios
^subprojects
+# headers under rust are only used for input to bindgen
+^rust
# plugin binaries are standalone
^contrib/plugins
# the ebpf tool is standalone, and the skeleton header is autogenerated
@@ -124,15 +126,28 @@ grep -v '^#' >"$REGEXFILE" <<EOT
^ebpf/rss.bpf.skeleton.h
# These files just include some other .c file and have no content themselves
^linux-user/(mips64|x86_64)/(cpu_loop|signal).c
+^linux-user/mips64/elfload.c
# These are autogenerated headers
^include/standard-headers/
# osdep.h itself and its friends are expected to include system headers
^include/qemu/osdep.h
^include/qemu/compiler.h
^include/glib-compat.h
-^include/system/os-(posix|win32).h
+^include/system/os-(posix|win32|wasm).h
# This is for use by plugins, which are standalone binaries
^include/qemu/qemu-plugin.h
+# standalone tools used in building the hexagon target code
+^target/hexagon/(idef-parser|gen_semantics.c|gen_dectree_import.c)
+# standalone tool
+^target/s390x/gen-features.c
+# gen-vdso is a standalone tool
+^linux-user/gen-vdso.c
+# feature-detection code used by meson.bulid
+^scripts/xen-detect.c
+# autogenerated by tracetool
+^tests/tracetool/simple.c
+# these just include another C file
+^tests/unit/test-rcu-(simpleq|slist|tailq).c
EOT
# We assume there are no files in the tree with spaces in their name