Repository navigation
fix(macos): honor caller-supplied CMAKE_OSX_ARCHITECTURES - #101
Open
aleclarson wants to merge 1 commit into
Open
aleclarson wants to merge 1 commit into
aleclarson wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
aleclarson
added a commit
to octane-xplat/octane-xplat
that referenced
this pull request
Oct 29, 2026
The AppKit host, NativeScript framework, Mason engine and app native leaves now ship arm64 and x86_64 slices, with per-architecture SDK metadata selected by the host. Packages land in artifacts/macos-universal/, and prebuilt dylibs must contain both slices. The runtimes patch carries the macOS architecture fix proposed upstream in NativeScript/runtimes#101. BREAKING CHANGE: macOS artifacts move from artifacts/macos-arm64/ to artifacts/macos-universal/ (<Name>-macos-universal.dmg), and packages' prebuiltLibraries must be universal binaries.
11 of 52 tasks
This branch has not been deployed
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.
Summary
The
macosbranch ofNativeScript/CMakeLists.txtunconditionally setsCMAKE_OSX_ARCHITECTUREStoarm64. That normal variable shadows a-DCMAKE_OSX_ARCHITECTURES=...cache value, so the macOS framework can't be built for Intel Macs, even though the bundledlibffi/macosx-universalalready has an x86_64 slice,TARGET_PLATFORM_SPECismacos-arm64_x86_64, andscripts/metagen.jsalready has an x86_64 macOS target.This keeps
arm64as the default and only uses it when the caller hasn't chosen architectures.Evidence
In Octane Xplat's AppKit host, we built the
TARGET_PLATFORM=macos,TARGET_ENGINE=none,NS_FFI_BACKEND=napiframework withCMAKE_OSX_ARCHITECTURES=x86_64and this one-line change, on an arm64 Mac with Xcode 27. We embedded x86_64 metadata generated with-target x86_64-apple-macos11.0. The resulting x86_64NativeScript.frameworkran a minimal AppKit app to completion on a real Intel Mac (macOS 15.7.7). Default builds without-DCMAKE_OSX_ARCHITECTURESare unchanged.