Bug 200836 - Add XCBuild support to ANGLE
Summary: Add XCBuild support to ANGLE
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Rollin
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-08-16 15:39 PDT by Keith Rollin
Modified: 2019-08-16 20:45 PDT (History)
10 users (show)

See Also:


Attachments
Patch (6.55 KB, patch)
2019-08-16 15:43 PDT, Keith Rollin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Rollin 2019-08-16 15:39:15 PDT
The ANGLE Xcode project contains two Build Phases: one that copies some headers, and another that modifies those headers. This combination does not work with XCBuild, which gets confused when it finds that headers that it's copied have been changed. When it detects this, XCBuild thinks that it should recopy those headers on the next build, causing their modification dates to change and for all dependent files to be rebuilt. This essentially turns an incremental rebuild into a full rebuild.

Address this problem by using a new facility in Xcode 11. This facility supports the copying and modifying headers files in a single step. It is achieved by first enabling the facility by setting APPLY_RULES_IN_COPY_HEADERS to YES. Next, we add a new Build Rule that invokes a custom script when the header files are copied. Third, we provide this script, which can essentially be a stripped down version of the one already used to modify the exported headers files. Finally, we disable the use of that old script when we are using Xcode 11. In this way, the old script that modifies the exported headers is used in Xcode 10, and the new facility is used in Xcode 11.

See also Bug 197340 for where this process was also applied to JavaScriptCore, WebKit, and WebKitLegacy.
Comment 1 Radar WebKit Bug Importer 2019-08-16 15:39:35 PDT
<rdar://problem/54410420>
Comment 2 Keith Rollin 2019-08-16 15:43:11 PDT
Created attachment 376548 [details]
Patch
Comment 3 EWS Watchlist 2019-08-16 15:46:10 PDT
Note that there are important steps to take when updating ANGLE. See http://trac.webkit.org/wiki/UpdatingANGLE
Comment 4 WebKit Commit Bot 2019-08-16 20:45:51 PDT
Comment on attachment 376548 [details]
Patch

Clearing flags on attachment: 376548

Committed r248813: <https://trac.webkit.org/changeset/248813>
Comment 5 WebKit Commit Bot 2019-08-16 20:45:53 PDT
All reviewed patches have been landed.  Closing bug.