Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5f96054d1d1a4ad40ccea8dd353b2e7c2b6ddb01
      
https://github.com/WebKit/WebKit/commit/5f96054d1d1a4ad40ccea8dd353b2e7c2b6ddb01
  Author: Elliott Williams <[email protected]>
  Date:   2025-06-30 (Mon, 30 Jun 2025)

  Changed paths:
    M Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig
    M Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
    M Source/WTF/Scripts/audit-spi-if-needed.sh
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebGPU/WebGPU.xcodeproj/project.pbxproj
    M Source/WebKit/Configurations/WebKit.xcconfig
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    M Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj
    M Tools/Scripts/libraries/webkitapipy/webkitapipy/program.py
    A Tools/Scripts/libraries/webkitapipy/webkitapipy/program_unittest.py

  Log Message:
  -----------
  [webkitapipy] Rework input files to recognize textual SPI and reduce 
configuration
https://bugs.webkit.org/show_bug.cgi?id=294760
rdar://153918728

Reviewed by Brianna Fan.

A grab bag of changes to audit-spi's command line:

- Instead of being invoked with one "primary file" to audit and other
  files to allow IPI (arbitrary) usage of, support multiple input files,
  and check them in one invocation. This works towards being able to
  exhaustively check an allowlist to ensure that allowed SPI is cleaned
  up once it is no longer used.

- To indicate libraries for allowed IPI use, accept ld-style
  `-framework` and `-lx` argument to load frameworks and libraries on
  top of the base SDKDB, for allowed IPI use.

  For example, WebKit is allowed to use any symbol or declaration from
  JavaScriptCore and WebCore, so it is audited with `-framework WebCore
  -framework JavaScriptCore`.

- Some ObjC interfaces are headers-only. Namely, they are part of a
  framework but do not have any binary representation in that framework,
  because they are intended for clients to implement. For example,
  WebKit has many delegate protocols that it never adopts locally, but
  will call methods on. These selectors are flagged as unknown SPI.

  Fix by reordering when audit-spi runs, so that it runs *after* a
  target builds and its InstallAPI postprocessing tasks have run.
  Add a flag to OTHER_TAPI_FLAGS which instructs tapi to dump a partial
  SDKDB of the framework's headers. Teach audit-spi to find these
  partial SDKDBs and ingest them.

  For example: WebKit now produces a `WebKit.partial.sdkdb` containing
  records of its headers-only declarations. After WebKit, WebKitSwift,
  and _WebKit_SwiftUI finish building, audit-spi runs and checks all
  three. It finds the partial SDKDB and adds it to the internal
  database.

* Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig: Emit a
  partial SDKDB during InstallAPI.
* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
  Update audit-spi invocation and move it to the aggregate target that
  builds after JSC has finished.
* Source/WTF/Scripts/audit-spi-if-needed.sh: Update audit-spi
  invocation.
* Source/WebCore/WebCore.xcodeproj/project.pbxproj: Update audit-spi
  invocation.
* Source/WebGPU/WebGPU.xcodeproj/project.pbxproj: Update audit-spi
  invocation.
* Source/WebKit/Configurations/WebKit.xcconfig:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj: Update audit-spi
  invocation, and move it to the aggregate target than runs after
  WebKit, WebKitSwift, and _WebKit_SwiftUI have finished building.
* Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj: Update
  audit-spi invocation.
* Tools/Scripts/libraries/webkitapipy/webkitapipy/program.py:
(Options): Added. Since there are a bunch of changes to the CLI, add a
helper object which provides type hints for all the arguments we
recognize. This makes future changes to the parser participate in
type checking.
(TSVReporter): Print file names in output when more than there's more
than one input file.
(get_parser): Add new arguments.
* Tools/Scripts/libraries/webkitapipy/webkitapipy/program_unittest.py: Added.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to