virtmem: include OSCacheControl.h on all Apple platforms#521
Open
avwohl wants to merge 1 commit into
Open
Conversation
sys_icache_invalidate() is needed for icache flushing on iOS, Mac Catalyst, and macOS — not just OSX. Upstream gates the include behind TARGET_OS_OSX, which breaks Mac Catalyst builds with "undeclared identifier 'sys_icache_invalidate'". Move the include out of the TARGET_OS_OSX block so all Apple SDKs get it. Used by avwohl/iospharo via submodule pin.
avwohl
pushed a commit
to avwohl/iospharo
that referenced
this pull request
May 17, 2026
asmjit/asmjit#521 — virtmem: include OSCacheControl.h on all Apple platforms. State: OPEN, awaiting maintainer review. Replaced the ready-to-fire `gh pr create` block with the PR URL + follow-up steps (what to do on merge vs rejection). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sys_icache_invalidate() is called by VirtMem::flushInstructionCache on every Apple SDK (iOS, Mac Catalyst, tvOS, watchOS, macOS), but the #include <libkern/OSCacheControl.h> is currently guarded by TARGET_OS_OSX. On Mac Catalyst (TARGET_OS_OSX=0, TARGET_OS_MACCATALYST=1) this fails to compile with "undeclared identifier sys_icache_invalidate".
This patch moves the include out of the TARGET_OS_OSX guard. The header is available on every Apple SDK so the unconditional include is safe.
Verified on Mac Catalyst arm64 (Xcode 26 / macOS 26.5 SDK) — fixes the build break.