[iwyu] Add script to check that headers can be included in isolation
The most important point of IWYU (include-what-you-use) is that each header includes everything it is using, so that whoever includes that header does not need to additionally include other things. This CL adds a script which generates files to automatically check this. It is automatically invoked during "gclient runhooks" if the "check_v8_header_includes" variable is set. This script generates a number of .cc files in the "check-header-includes" directory, together with a "sources.gni" file which lists all the generated cc files. Each file includes one header. If additionally the gn args "v8_check_header_includes" is set, this gni file is included, and all the generated CC files will be compiled. This will detect violations of the aforementioned IWYU rule. R=titzer@chromium.org, machenbach@chromium.org Bug: v8:7754, v8:7965 Change-Id: Id1cf256507052c3a9ea82f8c80ea1c0385457e31 Reviewed-on: https://chromium-review.googlesource.com/1145199 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Ben Titzer <titzer@chromium.org> Reviewed-by: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#54590}
Showing
Please
register
or
sign in
to comment