Bug 257560 - [WebKit] Enable InstallAPI for macOS/tvOS/watchOS
Summary: [WebKit] Enable InstallAPI for macOS/tvOS/watchOS
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Elliott Williams
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-05-31 12:50 PDT by Elliott Williams
Modified: 2023-06-16 13:50 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elliott Williams 2023-05-31 12:50:47 PDT
Most of the work has already been done since iOS supports InstallAPI in WebKit/WebKitLegacy. Now that we have TAPI_USE_SRCROOT, we can enable it further without risking staleness build bugs.
Comment 1 Elliott Williams 2023-05-31 12:51:13 PDT
rdar://103361403
Comment 2 Elliott Williams 2023-06-01 16:37:48 PDT
Pull request: https://github.com/WebKit/WebKit/pull/14608
Comment 3 EWS 2023-06-08 12:31:24 PDT
Committed 264993@main (110ccc3202f3): <https://commits.webkit.org/264993@main>

Reviewed commits have been landed. Closing PR #14608 and removing active labels.
Comment 4 EWS 2023-06-08 19:22:58 PDT
Committed 265005@main (e32ba22bd31f): <https://commits.webkit.org/265005@main>

Reviewed commits have been landed. Closing PR #14801 and removing active labels.
Comment 5 Elliott Williams 2023-06-09 14:45:22 PDT
Re-opening for pull request https://github.com/WebKit/WebKit/pull/14826
Comment 6 EWS 2023-06-12 10:02:09 PDT
Committed 265074@main (5ddcda389f55): <https://commits.webkit.org/265074@main>

Reviewed commits have been landed. Closing PR #14826 and removing active labels.
Comment 7 EWS 2023-06-12 12:09:44 PDT
Committed 265078@main (39ba36f985d0): <https://commits.webkit.org/265078@main>

Reviewed commits have been landed. Closing PR #14874 and removing active labels.
Comment 8 Elliott Williams 2023-06-15 17:20:13 PDT
Re-opening for pull request https://github.com/WebKit/WebKit/pull/15031
Comment 9 Elliott Williams 2023-06-15 17:29:47 PDT
We need to build fix this for Mac Catalyst, due to the way that TAPI handles symbols in reexported frameworks.

In the catalyst build:

- WebCore implements WKRetain/WKRelease as part of the WAK library. The symbols are hidden (but present in the debug build's symbol table).

- WebKit implements its own WKRetain/WKRelease, which is exported. It also reexports WebCore, which it only does on macOS.

- During the InstallAPI verification phase, TAPI ignores any symbols from headers that are implemented from a reexported framework. This means that even though it parses WebKit's WKRetain/WKRelease declarations, it refuses to use them, failing with

    error: no declaration found for exported symbol '_WKRelease' in dynamic library
    error: no declaration found for exported symbol '_WKRetain' in dynamic library

This doesn't happen in production builds, because they stubify WebCore before WebKit begins building, so TAPI only reads re-exported symbols from WebCore.tbd.

Catalyst WebKit re-exporting WebCore, when all other iOS-like platforms do not, is probably an oversight, but it's too risky to fix now. The easiest thing we can do is just rename the hidden symbol.
Comment 10 EWS 2023-06-16 13:50:45 PDT
Committed 265255@main (159993b61597): <https://commits.webkit.org/265255@main>

Reviewed commits have been landed. Closing PR #15031 and removing active labels.