skia2/toolchain/linux_trampolines
Kevin Lubick 68d6ff9222 [includes] Reduce IWYU exports from SkTypes.h
SkTypes.h was found exporting <stddef.h> and <stdint.h>.
Thus if a Skia file includes SkTypes.h, it did not need
to include either of those files to use things like
size_t or uint8_t respectively. [1]

This also resulted in strange IWYU warnings like:
warning: size_t is defined in "include/core/SkTypes.h", which isn't directly #included.

Thus, this CL removes those additional exports, and as a result,
adds many more includes of <cstddef> and <cstdint>.

The second change this CL is to not use the default IWYU
mappings which are hard-coded into IWYU [2]. These defaults
are valid, but make suggestions for the C version of
headers and not the C++ ones (i.e. <stddef.h> over <cstddef>).

To make these recommendations align better with our preferred
style (the C++ ones), we use IWYU with --no_default_mappings
and then have to expand our existing mappings to better deal
with how IWYU would resolve some of these headers.

[1] https://codereview.chromium.org/1207893002/#msg49
[2] 4c0f396159/iwyu_include_picker.cc (L1221-L1234)

Change-Id: Iafebe190f8f3e86f252147b9f538c182bcc34af4
Bug: skia:13052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555516
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-07-06 14:52:55 +00:00
..
ar_trampoline_linux.sh set up tools for building Skia on Mac semi hermetically 2022-05-04 16:56:46 +00:00
clang_trampoline_linux.sh [includes] Reduce IWYU exports from SkTypes.h 2022-07-06 14:52:55 +00:00
IWYU_mapping.imp [includes] Reduce IWYU exports from SkTypes.h 2022-07-06 14:52:55 +00:00
lld_trampoline_linux.sh set up tools for building Skia on Mac semi hermetically 2022-05-04 16:56:46 +00:00