Skip to content

[CMake] Fix Mac CMake build for bmalloc#62544

Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
pascoej:eng/cmake-mac-bmalloc
Apr 13, 2026
Merged

[CMake] Fix Mac CMake build for bmalloc#62544
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
pascoej:eng/cmake-mac-bmalloc

Conversation

@pascoej
Copy link
Copy Markdown
Member

@pascoej pascoej commented Apr 11, 2026

be740b1

[CMake] Fix Mac CMake build for bmalloc
https://bugs.webkit.org/show_bug.cgi?id=312019
rdar://problem/174561810

Reviewed by BJ Burg.

Reorganize bmalloc headers into public and private sets so downstream
targets only see the API surface they need. Add missing TZoneLog.h to
the public list. Remove stale IsoHeap.cpp reference and add Foundation
framework linking for ProcessCheck.mm. Add missing BAssert.h include
in TZoneHeap.h.

Based on a base patch by Simon Lewis. Incorporates private header
reorganization from Ian Grunert (PR #62543).

* Source/bmalloc/CMakeLists.txt:
* Source/bmalloc/PlatformMac.cmake:
* Source/bmalloc/bmalloc/TZoneHeap.h:

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

33e626c

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows Apple Internal
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe 🛠 win ⏳ 🛠 ios-apple
✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 🧪 win-tests ⏳ 🛠 mac-apple
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe ⏳ 🛠 vision-apple
🧪 ios-wk2-wpt 🧪 api-mac-debug ✅ 🛠 gtk3-libwebrtc
✅ 🛠 🧪 jsc ✅ 🧪 api-ios 🧪 mac-wk1 ✅ 🛠 gtk
✅ 🛠 🧪 jsc-debug-arm64 ✅ 🧪 mac-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🛠 playstation
✅ 🧪 vision-wk2 🧪 mac-intel-wk2 ✅ 🛠 jsc-armv7
✅ 🛠 tv ✅ 🧪 jsc-armv7-tests
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@pascoej pascoej requested a review from a team as a code owner April 11, 2026 15:18
@pascoej pascoej self-assigned this Apr 11, 2026
@pascoej pascoej added the CMake Bugzilla component for CMake build system changes label Apr 11, 2026
@pascoej pascoej requested a review from burg April 11, 2026 15:20
@pascoej pascoej changed the title [CMake] Fix Mac CMake build for bmalloc [CMake] Fix Mac CMake build for bmalloc https://bugs.webkit.org/show_bug.cgi?id=312019 rdar://problem/174561810 Apr 11, 2026
@pascoej pascoej force-pushed the eng/cmake-mac-bmalloc branch from c3afb42 to 48ecc5c Compare April 11, 2026 16:28
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Apr 11, 2026
Comment on lines +9 to +10
find_library(FOUNDATION_LIBRARY Foundation)
list(APPEND bmalloc_LIBRARIES ${FOUNDATION_LIBRARY})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typically for CMake we put all platform-specific find_library() and find_package() calls in Source/cmake/Options{Mac,GTK,..}.cmake to have a single source where the main dependencies are listed. Is there some particular reason for this to be an exception?

Also, it may be possible to use bmalloc_PRIVATE_LIBRARIES here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the existing CMake Mac code is structured in this way in PlatformMac.cmake. Let's clean it up in the second pass of PRs, once the main targets are fixed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pascoej pascoej removed the merging-blocked Applied to prevent a change from being merged label Apr 12, 2026
@pascoej pascoej changed the title [CMake] Fix Mac CMake build for bmalloc https://bugs.webkit.org/show_bug.cgi?id=312019 rdar://problem/174561810 [CMake] Fix Mac CMake build for bmalloc Apr 12, 2026
@pascoej pascoej force-pushed the eng/cmake-mac-bmalloc branch from 48ecc5c to d09043a Compare April 12, 2026 05:22
@pascoej pascoej force-pushed the eng/cmake-mac-bmalloc branch from d09043a to dfc4d99 Compare April 12, 2026 19:49
Copy link
Copy Markdown
Contributor

@burg burg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me, cool!

@@ -624,6 +572,55 @@ set(bmalloc_PUBLIC_HEADERS
libpas/src/libpas/pas_zero_memory.h
libpas/src/libpas/pas_zero_mode.h
libpas/src/libpas/thingy_heap_config.h
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thingy is a debug API, should this header belong alongside the other two thingy headers?

Comment on lines +9 to +10
find_library(FOUNDATION_LIBRARY Foundation)
list(APPEND bmalloc_LIBRARIES ${FOUNDATION_LIBRARY})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the existing CMake Mac code is structured in this way in PlatformMac.cmake. Let's clean it up in the second pass of PRs, once the main targets are fixed.

@pascoej pascoej force-pushed the eng/cmake-mac-bmalloc branch from dfc4d99 to 33e626c Compare April 13, 2026 15:06
@pascoej pascoej added the merge-queue Applied to send a pull request to merge-queue label Apr 13, 2026
https://bugs.webkit.org/show_bug.cgi?id=312019
rdar://problem/174561810

Reviewed by BJ Burg.

Reorganize bmalloc headers into public and private sets so downstream
targets only see the API surface they need. Add missing TZoneLog.h to
the public list. Remove stale IsoHeap.cpp reference and add Foundation
framework linking for ProcessCheck.mm. Add missing BAssert.h include
in TZoneHeap.h.

Based on a base patch by Simon Lewis. Incorporates private header
reorganization from Ian Grunert (PR WebKit#62543).

* Source/bmalloc/CMakeLists.txt:
* Source/bmalloc/PlatformMac.cmake:
* Source/bmalloc/bmalloc/TZoneHeap.h:

Canonical link: https://commits.webkit.org/311104@main
@webkit-commit-queue
Copy link
Copy Markdown
Collaborator

Committed 311104@main (be740b1): https://commits.webkit.org/311104@main

Reviewed commits have been landed. Closing PR #62544 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit be740b1 into WebKit:main Apr 13, 2026
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CMake Bugzilla component for CMake build system changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants