[webkit-changes] [WebKit/WebKit] 76096b: [Xcode] Enable TAPI_USE_SRCROOT to avoid giving st...

Elliott Williams noreply at github.com
Thu Feb 16 12:04:03 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 76096b8d08bca438a88715518bada864c072357a
      https://github.com/WebKit/WebKit/commit/76096b8d08bca438a88715518bada864c072357a
  Author: Elliott Williams <emw at apple.com>
  Date:   2023-02-16 (Thu, 16 Feb 2023)

  Changed paths:
    M Configurations/WebKitTargetConditionals.xcconfig
    M Source/WebGPU/Configurations/WebGPU.xcconfig
    M Source/WebKit/Configurations/Base.xcconfig
    M Source/WebKit/Configurations/WebKit.xcconfig
    M Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig
    M Tools/Scripts/build-webkit
    M Tools/Scripts/webkitdirs.pm

  Log Message:
  -----------
  [Xcode] Enable TAPI_USE_SRCROOT to avoid giving stale headers to tapi
https://bugs.webkit.org/show_bug.cgi?id=250612
rdar://103361037

Reviewed by Alexey Proskuryakov.

In recent Xcodes, TAPI_USE_SRCROOT will cause tapi to read headers from
the project's sources, as reported by Xcode. This is in contrast with
the traditional behavior, where tapi reads *any* header in the
framework's bundle directory, and is therefore liable to picking up
stale or incorrect headers left from a prior build.

In shipping Xcode, this behavior can be tested by building with
UseSRCROOTSupportForTAPI=1 as an environment variable.

* Configurations/WebKitTargetConditionals.xcconfig: Add target
  conditionals for shipping Xcode versions.

For the following xcconfigs:
1. Enable TAPI_USE_SRCROOT in upcoming Xcodes.
2. When TAPI_USE_SRCROOT is enabled, work around rdar://104432605 by
   passing umbrella headers as pre-includes.

* Source/WebGPU/Configurations/WebGPU.xcconfig:
* Source/WebKit/Configurations/Base.xcconfig:
* Source/WebKit/Configurations/WebKit.xcconfig:
  - WebKit additionally needs a pre-include of config.h, because tapi's
    SRCROOT mode reads unprocessed headers that depend on config.h being
    imported first (this is rdar://104248994).
  - Use NORMAL_UMBRELLA_FRAMEWORKS_DIR on a line in the diff.
  - Remove reference to NSURLDownloadSPI.h, which is no longer part of
    the target.
* Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig:

* Tools/Scripts/build-webkit: Set UseSRCROOTSupportForTAPI=YES by
  default where it is supported. This enables SRCROOT mode in EWS.
  Make-based builds are not affected.
* Tools/Scripts/webkitdirs.pm:
(xcodeVersion): Added getter subroutine for $xcodeVersion.
(XcodeOptions): When $ENV{UseSRCROOTSupportForTAPI} is
  truthy, set the TAPI_USE_SRCROOT build setting. This allows us to
  write config logic based on TAPI_USE_SRCROOT that works on older
  Xcodes.

Canonical link: https://commits.webkit.org/260390@main




More information about the webkit-changes mailing list