[webkit-reviews] review requested: [Bug 235744] [XCBuild] WTF's headers are copied via a script and are invisible to the build system : [Attachment 450297] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jan 28 18:28:30 PST 2022
Elliott Williams <emw at apple.com> has asked for review:
Bug 235744: [XCBuild] WTF's headers are copied via a script and are invisible
to the build system
https://bugs.webkit.org/show_bug.cgi?id=235744
Attachment 450297: Patch
https://bugs.webkit.org/attachment.cgi?id=450297&action=review
--- Comment #5 from Elliott Williams <emw at apple.com> ---
Comment on attachment 450297
--> https://bugs.webkit.org/attachment.cgi?id=450297
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=450297&action=review
Back to r?
This approach is obtuse. But as far as I can tell, the best way to get what we
need (native PbxCp tasks for each header) is to create one copy files build
phase per header subdirectory.
Alternatives considered:
1. Copy the entire `wtf/` directory using a copy files phase: This generates
the right task information for each header (letting downstream tasks depend on
specific headers), but it copies the entire wtf/ directory, including source
code. As far as I can tell, there's no way to exclude sources from the copy
without having a separate script phase that removes non-headers from
/usr/local/include/wtf. I experimented with such a script phase, but it would
run redundantly and cause spurious recompilation of source files.
2. Modify the existing rsync-based script to generate input and output
xcfilelists: This would give us input/output xcfilelists to provide to the
build system, but they would need to be committed since we use them for build
task ordering. A proof-of-concept is easy, but to get expected functionality
(like forcing a rebuild when the list of headers changes), we'd need to hook
this into generate_xcfilelists_lib which would be less trivial.
> Source/WTF/WTF.xcodeproj/project.pbxproj:1314
> + DD3DC9C127A4C4BD007E5B61 /* spi */ = {isa = PBXFileReference;
lastKnownFileType = folder; path = spi; sourceTree = "<group>"; };
The `spi/` headers are a special case: The SPI directory _only_ contains
headers, and it's highly nested. It'd be annoying to have separate build phases
for each subdirectory within spi/, but since it only has headers we can tell
Xcode to copy the whole directory and its contents. Switching to a folder
reference removes the PBXFileReferences for each header and replaces it with
this reference, which appears as a blue folder in the project navigator.
More information about the webkit-reviews
mailing list