Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f44c86db5003fede3b49264849ed279256d6ef25
https://github.com/WebKit/WebKit/commit/f44c86db5003fede3b49264849ed279256d6ef25
Author: Richard Robinson <[email protected]>
Date: 2026-04-13 (Mon, 13 Apr 2026)
Changed paths:
M Source/WTF/Scripts/modules-verifier/library-modules-verifier.py
M Source/WTF/WTF.xcodeproj/project.pbxproj
M Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
M Source/bmalloc/bmalloc.xcodeproj/project.pbxproj
Log Message:
-----------
[Swift in WebKit] The custom library module verifier should only run if a
private header in the relevant project gets changed/added/removed
https://bugs.webkit.org/show_bug.cgi?id=312060
rdar://169102773
Reviewed by Elliott Williams and Geoffrey Garen.
The Verify Module script phase ran on every incremental build because it
had no declared outputs and no discovered dependency file, so the build
system always considered it out of date.
This patch follows the pattern established by the Audit SPI build phase
in WebKit.xcodeproj: declare a dependencyFile (.d) and a timestamp
output so the build system can skip the phase when nothing has changed.
* Source/WTF/Scripts/modules-verifier/library-modules-verifier.py:
- Add a --depfile argument that writes a Makefile-style discovered
dependency file listing each header from the TAPI JSON filelist.
- Move argument parsing and JSON loading before the
ENABLE_WK_LIBRARY_MODULE_VERIFIER check so that the dependency file
is always emitted, even when the verifier is disabled.
* Source/bmalloc/bmalloc.xcodeproj/project.pbxproj:
* Source/WTF/WTF.xcodeproj/project.pbxproj:
* Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj:
- Add dependencyFile = "$(DERIVED_FILES_DIR)/verify-module.d" so the
build system reads discovered dependencies after each run.
- Add outputPaths with a verify-module.timestamp file so the build
system has an output to compare input timestamps against.
- Remove the $(DSTROOT) JSON filelist from inputPaths, since it does
not exist in non-deployment builds and would cause the phase to be
considered always dirty. The DSTROOT JSON is still passed directly
to the verifier in the deployment code path, and the discovered
dependency file covers header-level change tracking regardless of
which JSON filelist is used.
- Update the inline shell script to: derive the depfile path from
SCRIPT_OUTPUT_FILE_0, pass --depfile to the verifier, write an
empty dependency file during installhdrs, and touch the timestamp
on completion.
When building with the command
```
xcodebuild -scheme "Everything up to JavaScriptCore"
-UseSanitizedBuildSystemEnvironment=YES -ShowBuildOperationDuration=YES
-workspace <workspace-dir> -configuration Debug -destination
platform=macOS,devicetype=Mac,arch=arm64e SYMROOT=<build-dir>
OBJROOT=<build-dir> SHARED_PRECOMPS_DIR=<build-dir>/PrecompiledHeaders
SDKROOT=macosx.internal -hideShellScriptEnvironment
```
this saves an average of `1.6784` seconds.
Canonical link: https://commits.webkit.org/311177@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications