Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2dbae6f74c8d0390568b497fe56b47f738a2dc72
https://github.com/WebKit/WebKit/commit/2dbae6f74c8d0390568b497fe56b47f738a2dc72
Author: Zak Ridouh <[email protected]>
Date: 2026-04-17 (Fri, 17 Apr 2026)
Changed paths:
M CMakePresets.json
M Source/WebKit/PlatformMac.cmake
M Source/WebKitLegacy/PlatformMac.cmake
M Source/cmake/OptionsMac.cmake
Log Message:
-----------
[CMake] Add mac-asan preset and fix sanitizer link flags
https://bugs.webkit.org/show_bug.cgi?id=312514
rdar://174956971
Reviewed by Geoffrey Garen.
Add a mac-asan CMake preset for AddressSanitizer builds and fix two
pre-existing bugs that prevented ENABLE_SANITIZERS from working on the
Mac port.
The mac-asan preset uses RelWithDebInfo (optimized + debuggable), enables
ENABLE_SANITIZERS=address, and inherits dev settings (ccache,
compile_commands).
OptionsMac.cmake now mirrors Configurations/Sanitizers.xcconfig by adding
-fsanitize-address-use-after-return=never (disables ASan's fake stack
which breaks JSC garbage collection) and -DRELEASE_WITHOUT_OPTIMIZATIONS
(prevents ALWAYS_INLINE from defeating sanitizer instrumentation). Both
flags are gated to exclude Swift compilation and linking.
Fix unquoted CMAKE_SHARED_LINKER_FLAGS appends in WebKit and
WebKitLegacy PlatformMac.cmake. Without quotes, CMake treats the
expansion as a list, inserting a literal semicolon into the generated
Ninja link command, which the shell interprets as a command separator.
This was latent when CMAKE_SHARED_LINKER_FLAGS was empty but breaks any
build that populates it (e.g. ENABLE_SANITIZERS).
* CMakePresets.json:
* Source/WebKit/PlatformMac.cmake:
* Source/WebKitLegacy/PlatformMac.cmake:
* Source/cmake/OptionsMac.cmake:
Canonical link: https://commits.webkit.org/311472@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications