|Summary:||postprocess-headers.sh: Avoid redundant processing to speed up incremental Xcode builds|
|Product:||WebKit||Reporter:||Elliott Williams <emw>|
|Component:||New Bugs||Assignee:||Nobody <webkit-unassigned>|
|Severity:||Normal||CC:||ap, ews-watchlist, jbedard, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer|
|Version:||WebKit Nightly Build|
Description Elliott Williams 2022-01-06 17:55:22 PST
postprocess-headers.sh: Avoid redundant processing to speed up incremental Xcode builds
Comment 2 Elliott Williams 2022-01-07 17:23:07 PST
Alexey <firstname.lastname@example.org> pointed me to similar patches in the past that have caused problems. I don't think they invalidate my approach here, but am curious to hear if you think otherwise: - https://bugs.webkit.org/show_bug.cgi?id=220239 - https://bugs.webkit.org/show_bug.cgi?id=166810 These involved conditionally skipping a write to a file when its prerequisites changed. Skipping writes meant not updating an output file's modification time, which caused the respective scripts to execute on every rebuild after it had decided to skip writing an output file. This patch determines whether *Xcode* skipped a copy, and only skips postprocessing if Xcode skipped copying. Skipping postprocessing should not lead to situations where Xcode tries to copy a header repeatedly, since Xcode's build system is not interested in whether this script runs at all. - https://bugs.webkit.org/show_bug.cgi?id=77510 I'm not sure how this one is related -- seems like it ultimately caused problems because of complex Make logic that broke rebuilds. -- It's worth noting that we only have postprocess-headers.sh because APPLY_RULES_IN_COPY_FILES is not supported by the legacy build system. Changing it to only process a file once per copy matches behavior we get from the copy file build rule in XCBuild.
Comment 3 EWS 2022-01-10 09:10:31 PST
Committed r287837 (245889@main): <https://commits.webkit.org/245889@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 448552 [details].