Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7af9d274a3345cdc2150e42cd34022fd6ca90888
      
https://github.com/WebKit/WebKit/commit/7af9d274a3345cdc2150e42cd34022fd6ca90888
  Author: Keith Miller <[email protected]>
  Date:   2026-08-31 (Mon, 31 Aug 2026)

  Changed paths:
    M Source/JavaScriptCore/CMakeLists.txt
    M Source/WTF/wtf/CMakeLists.txt
    M Source/WTF/wtf/PlatformCocoa.cmake
    M Source/WebCore/CMakeLists.txt
    M Source/WebCore/testing/WebFakeXRDevice.cpp
    M Source/WebGPU/WGSL/CMakeLists.txt
    M Source/WebGPU/WebGPU/CMakeLists.txt
    M Source/WebKit/CMakeLists.txt
    M Source/cmake/OptionsCocoa.cmake
    M Source/cmake/WebKitCommon.cmake
    M Source/cmake/WebKitMacros.cmake

  Log Message:
  -----------
  [CMake] Enable Thread/Unsafe Buffer Warnings on Cocoa Ports
https://bugs.webkit.org/show_bug.cgi?id=322984
rdar://186256294

Reviewed by Zak Ridouh.

The Cocoa CMake build didn't enable thread safety or unsafe buffer
warnings by default. This patch does so. It also applies unsafe buffer
warning CFlags to all targets rather than having each target opt-in.
There's not really any reason to opt-out of thread safety warnings since
code needs to be annotated, hence opt-in, anyway.

┌────────────────────────────┬─────────────────────────┬───────────────────────────┐
│           Target           │       xcodebuild        │    CMake (after 
changes)  │
├────────────────────────────┼─────────────────────────┼───────────────────────────┤
│ WTF                        │ both                    │ both                   
   │
├────────────────────────────┼─────────────────────────┼───────────────────────────┤
│ JavaScriptCore             │ both                    │ both                   
   │
├────────────────────────────┼─────────────────────────┼───────────────────────────┤
│ WebCore + 3 shards         │ both                    │ both                   
   │
├────────────────────────────┼─────────────────────────┼───────────────────────────┤
│ WebKit + 2 shards          │ both                    │ both                   
   │
├────────────────────────────┼─────────────────────────┼───────────────────────────┤
│ PAL                        │ both                    │ both                   
   │
├────────────────────────────┼─────────────────────────┼───────────────────────────┤
│ WebGPU                     │ both                    │ both                   
   │
├────────────────────────────┼─────────────────────────┼───────────────────────────┤
│ WGSLCore                   │ both (WGSL.xcconfig)    │ both                   
   │
├────────────────────────────┼─────────────────────────┼───────────────────────────┤
│ WebCoreTestSupport         │ both (inherits WebCore) │ both                   
   │
├────────────────────────────┼─────────────────────────┼───────────────────────────┤
│ WebInspectorUI             │ both                    │ n/a — not a CMake 
target  │
├────────────────────────────┼─────────────────────────┼───────────────────────────┤
│ bmalloc                    │ thread-safety           │ thread-safety          
   │
├────────────────────────────┼─────────────────────────┼───────────────────────────┤
│ WebKitLegacy               │ thread-safety           │ thread-safety          
   │
├────────────────────────────┼─────────────────────────┼───────────────────────────┤
│ TestWebKitAPI (4 binaries) │ thread-safety           │ thread-safety          
   │
├────────────────────────────┼─────────────────────────┼───────────────────────────┤
│ libwebrtc, ANGLE, libyuv...| none                    │ thread-safety 
(superset)  │
└────────────────────────────┴─────────────────────────┴───────────────────────────┘

Source/WTF/wtf/PlatformCocoa.cmake:
    Opt out the autogenerated mig.c file from unsafe buffer warnings.
    It's a derived source we don't control so should be treated like a
    library source.
* Source/WebCore/testing/WebFakeXRDevice.cpp:
    Wrap unsafe buffer use uncoverd by adding WebCoreTestSupport
    coverage with ALLOW_UNSAFE_BUFFER_USAGE_BEGIN/END macros

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



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

Reply via email to