Apple: visionOS and tvOS builds now supported; update to 26.4 SDKs#162
Closed
stuartcarnie wants to merge 1 commit intogodotengine:mainfrom
Closed
Apple: visionOS and tvOS builds now supported; update to 26.4 SDKs#162stuartcarnie wants to merge 1 commit intogodotengine:mainfrom
stuartcarnie wants to merge 1 commit intogodotengine:mainfrom
Conversation
This was referenced Apr 11, 2026
akien-mga
reviewed
Apr 13, 2026
| # Custom build Apple Clang to ensure compatibility. | ||
| # Find the equivalent LLVM version for the SDK from: | ||
| # https://en.wikipedia.org/wiki/Xcode#Toolchain_versions | ||
| CLANG_VERSION=19.1.5 ENABLE_CLANG_INSTALL=1 INSTALLPREFIX=/usr ./build_apple_clang.sh && \ |
Member
There was a problem hiding this comment.
For Xcode 26.4, we should use Clang 21.1.6: https://en.wikipedia.org/wiki/Xcode#Xcode_26.0_(since_version_number_change)_2
Contributor
Author
There was a problem hiding this comment.
I'll test that to make sure everything compiles with 21.1.6
akien-mga
reviewed
Apr 13, 2026
| git clone --progress https://github.com/tpoechtrager/osxcross && \ | ||
| cd /root/osxcross && \ | ||
| git checkout 121ce150c7857a9474dfff8a8e431482806b3e1b && \ | ||
| # latest commit from main branch |
Member
There was a problem hiding this comment.
Suggested change
| # latest commit from main branch | |
| # Latest commit from main branch. |
akien-mga
reviewed
Apr 13, 2026
|
|
||
| RUN curl -O https://download.swift.org/swiftly/linux/swiftly-$(uname -m).tar.gz && \ | ||
| tar zxf swiftly-$(uname -m).tar.gz && \ | ||
| ./swiftly init --platform ubi9 --quiet-shell-followup -y && \ |
Member
There was a problem hiding this comment.
We should pin the version of Swift we're installing, to make sure it matches the Xcode SDK we're compiling for, and have reproducible container builds.
Seems like this can be done with something like:
./swiftly init --platform ubi9 --quiet-shell-followup --skip-install -y
~/.local/share/swiftly/bin/swiftly install 6.3.0
And as suggested in godotengine/godot-build-scripts#156 (comment) I'd add a ENV SWIFT_VERSION=6.3.0 that can be used here and in the build scripts.
Contributor
Author
|
Closed in favour of the New Improved™ |
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.
Changes in this PR:
Dockerfile.osxso visionOS Swift sources can be cross-compiled from Linux.osxcross-fix-visionos.patchwith the upstream fix from swiftlang/llvm-project#12174, adapted for the clang 19.1.5 tree in osxcross (AvailabilityMergeKind::None→AMK_None).files/appleembedded/patch-visionos-sdk.sh, invoked fromDockerfile.appleembedded, which rewrites the visionOS SDK in place:visionostoAPI_UNAVAILABLE(...)header lists whereveriosis already listed, working around swiftlang/llvm-project#11866 not yet being merged intoswift/release/6.3.// swift-compiler-version:in every.swiftinterfaceso the OSS Swift 6.3 release compiler accepts Apple's interfaces (the marketing version matches but the swiftlang stamps differ:swiftlang-6.3.0.123.xvsswift-6.3-RELEASE).@inlinablebodies inRealityFoundation.swiftinterfacethat reference C++ types fromsimd/AVFAudio(library-evolution errors under-cxx-interoperability-mode=default), and swaps theAudio.GeneratorRenderHandlertypealias to a function type so call sites using@escapingstill parse.CTTextAlignment/CTLineBreakModedefault-argument expressions inRealityKit.swiftinterfacewith raw-value initializers, since the OSS compiler strips C enum prefixes less aggressively than Apple's and the bare.left/.byTruncatingTailforms don't resolve.All SDK patches are idempotent, visionOS-only (they touch
XROS.sdk), and have comments pointing at the relevant upstream issue so each can be removed once the corresponding fix lands.