Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c2b3dcb3f9522bff14378bce042dcadeca6502d4
      
https://github.com/WebKit/WebKit/commit/c2b3dcb3f9522bff14378bce042dcadeca6502d4
  Author: Zak Ridouh <[email protected]>
  Date:   2026-07-23 (Thu, 23 Jul 2026)

  Changed paths:
    M Source/JavaScriptCore/PlatformMac.cmake
    M Source/WebCore/PlatformMac.cmake
    M Source/WebKit/CMakeLists.txt
    M Source/WebKit/PlatformMac.cmake

  Log Message:
  -----------
  [CMake] Make JavaScriptCore a real Clang module for the Mac Swift importer
https://bugs.webkit.org/show_bug.cgi?id=319625
rdar://182449652

Reviewed by Adrian Taylor.

The CMake Mac build stages JavaScriptCore's headers flat with no module
map, so every <JavaScriptCore/*.h> include is parsed textually. Expanding
WebCore_Private to a full umbrella (for the Swift back-forward list work,
bug 312083) makes a second Swift-imported module cover those JSC headers
alongside WebKit_Internal, so Clang sees each JSC type defined twice and
errors with "'JSC::X' has different definitions in different modules."

Stage JavaScriptCore's existing module maps into the built framework
bundle so the Swift Clang importer discovers JavaScriptCore and
JavaScriptCore_Private as real modules via -F, giving every consumer a
single owner for JSC headers. Also install the private headers the
private module map needs to parse standalone (matching the set iOS
already stages).

With JSC owning its headers, provide WebCore_Private the same way: stage
the in-tree Source/WebCore/WebCore_Private.modulemap into the WebCore
framework bundle (as iOS does in PlatformIOS.cmake) instead of generating
a separate umbrella map in the build dir, and add the WebCore
DerivedSources and style/computed directories to the importer's search
path so that umbrella parses standalone.

This mirrors Xcode, where all frameworks ship module maps.

* Source/JavaScriptCore/PlatformMac.cmake:
* Source/WebKit/CMakeLists.txt:
* Source/WebKit/PlatformMac.cmake:
* Source/WebCore/PlatformMac.cmake:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to