Bug 236613

Summary: [XCBuild] Add task inputs/outputs for "Make libWTF.a Symbolic Link"
Product: WebKit Reporter: Elliott Williams <emw>
Component: New BugsAssignee: Elliott Williams <emw>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Add task inputs/outputs
ap: review+, ews-feeder: commit-queue-
Remove build phase entirely none

Description Elliott Williams 2022-02-14 15:20:10 PST
[XCBuild] Add task inputs/outputs for "Make libWTF.a Symbolic Link"
Comment 1 Elliott Williams 2022-02-14 15:29:56 PST
Created attachment 451949 [details]
Add task inputs/outputs
Comment 2 Radar WebKit Bug Importer 2022-02-14 15:30:35 PST
<rdar://problem/88931997>
Comment 3 Alexey Proskuryakov 2022-02-14 16:34:54 PST
Comment on attachment 451949 [details]
Add task inputs/outputs

Out of curiosity, can the project be set up to find libWTF.a wherever it is, without a symlink? We have such behavior for everything else, like headers and dylibs.
Comment 4 Elliott Williams 2022-02-14 17:21:42 PST
(In reply to Alexey Proskuryakov from comment #3)
> Comment on attachment 451949 [details]
> Patch
> 
> Out of curiosity, can the project be set up to find libWTF.a wherever it is,
> without a symlink? We have such behavior for everything else, like headers
> and dylibs.

If we were to require that engineering builds always use a local libWTF.a, whereas production builds always use an SDK-provided libWTF.a, then we could determine this statically via a build setting.

I *think* that's the only valid use case, since an engineering build of JSC is likely to depend on WTF changes that haven't made it into the engineer's system SDK yet. Does that sound right?
Comment 5 Alexey Proskuryakov 2022-02-14 17:55:09 PST
I think that's correct.

But would that bring libWTF.a in line with how headers and dylibs are handled? If not, then I'm still curious about why it needs to be different.
Comment 6 Elliott Williams 2022-02-14 21:10:27 PST
(In reply to Alexey Proskuryakov from comment #5)
> I think that's correct.
Cool, I'll try it, and maybe we can delete this phase altogether.

> But would that bring libWTF.a in line with how headers and dylibs are
> handled? If not, then I'm still curious about why it needs to be different.
libWTF.a is unique in that it's passed to the linker via `-full_load`, which takes a file path and does not use the search paths that headers, frameworks, or libraries would typically use. Presumably, we do this because WebKit and WebCore use symbols from WTF that JavaScriptCore does not, so we can't allow the linker to strip them out.
Comment 7 Elliott Williams 2022-02-14 21:43:35 PST
Created attachment 451993 [details]
Remove build phase entirely
Comment 8 EWS 2022-02-15 10:35:12 PST
Committed r289823 (247281@main): <https://commits.webkit.org/247281@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 451993 [details].