Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 72ec90eba3416f058590d510153a1a6395e404e0
      
https://github.com/WebKit/WebKit/commit/72ec90eba3416f058590d510153a1a6395e404e0
  Author: Megan Gardner <[email protected]>
  Date:   2026-09-09 (Wed, 09 Sep 2026)

  Changed paths:
    M Source/WTF/Scripts/generate-unified-source-bundles.py
    M Source/cmake/WebKitMacros.cmake

  Log Message:
  -----------
  [CMake] Non-unified builds don't apply -fobjc-arc to ARC sources.
https://bugs.webkit.org/show_bug.cgi?id=323139
rdar://186400332

Reviewed by Pascoe.

Building with -DENABLE_UNIFIED_BUILDS=OFF on Cocoa fails: 97 .mm files in 
Source/WebKit error out with

    error: This file requires ARC. Add the "-fobjc-arc" compiler flag for this 
file.

A .mm entry in Sources*.txt compiles with ARC unless it is annotated @nonARC, 
but WEBKIT_COMPUTE_SOURCES
only ever learns that from bundle filenames. The bundler emits *-ARC.mm and 
*-nonARC.mm, and the unified
branch matches on -ARC\.mm$ to route sources into ${_framework}_ARC_SOURCES -- 
the OBJECT library that
carries -fobjc-arc.

The non-unified branch instead calls generate-unified-source-bundles.py with 
--print-all-sources, which
prints real source paths. There are no bundle filenames to match on, so every 
source landed in
${_framework}_SOURCES and nothing ever reached the ARC target.

Add a --print-arc-sources option to generate-unified-source-bundles.py that 
writes out the .mm sources
not annotated @nonARC, and use it in the non-unified branch to route those into 
${_framework}_ARC_SOURCES.

Only Source/WebKit and Source/WebGPU have ARC .mm sources today; WebCore and 
WebKitLegacy are entirely
@nonARC. Note that a framework acquiring ARC sources must also consume 
${_framework}_ARC_SOURCES in its
CMakeLists.txt, or those files will silently drop out of the non-unified build.

* Source/WTF/Scripts/generate-unified-source-bundles.py:
(parse_args):
(main):
* Source/cmake/WebKitMacros.cmake:

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



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

Reply via email to