You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Xcode 27 SDK cannot be linked on Linux: .tbd files declare arm64e.x1-ios, which the bundled LLD 20 cannot parse #269
Building against the Xcode 27 / iOS 27 SDK on Linux fails at the link step. The SDK builds and installs fine; the failure is the linker parsing the SDK's .tbd stubs, and the error it reports last is actively misleading.
What happens
$ xtool dev build
.../iPhoneOS27.0.sdk/System/Library/Frameworks/UniformTypeIdentifiers.framework/UniformTypeIdentifiers.tbd:3:32: error: unknown architecture
targets: [ arm64e-ios, arm64e.x1-ios ]
^~~~~~~~~~~~~~
ld64.lld: error: too many errors emitted, stopping now
ld64.lld: error: undefined symbol: main
>>> referenced by the entry point
undefined symbol: main reads like an error in the user's app. It is not — it is what LLD says after failing to parse libSystem.tbd, which is why the entry point never resolves. Spike.o defines _main (llvm-nm shows T _main).
675 .tbd files in iPhoneOS27.0.sdk declare arm64e.x1-ios, a target the bundled linker does not recognise. arm64e-ios it accepts; arm64e.x1-ios it does not.
Substituting a newer LLD does not work
The bundle's toolset/bin/orig/ld64.lld is LLD 20.0.0 (binary dated 2024-12-01). The Swift 6.4 toolchain ships LLD 21.0.0, but pointing the SDK at it fails differently:
ld64.lld: error: This version of lld does not support linking for platform iOS
which is presumably why xtool ships its own Mach-O linker rather than using the toolchain's.
The workaround that works
Stripping the unrecognised target from the stubs lets the bundled LLD 20 complete the link, and the app builds and links correctly — verified end to end: a SwiftUI app with a SwiftPM path dependency, producing Mach-O 64-bit arm64 executable linked against SwiftUI.framework and UIKit.framework.
grep -rl 'arm64e\.x1-ios' "$SDK_ROOT" | while read -r f; do
sed -i 's/, *arm64e\.x1-ios//g; s/arm64e\.x1-ios, *//g; s/arm64e\.x1-ios//g' "$f"
done
I'm happy to turn that into a PR or a documented step — but it edits a generated artifact, so it would need to survive xtool sdk install.
Environment
xtool 1.20.0 (xtool-x86_64.AppImage)
Ubuntu 24.04.4 LTS, x86_64
Swift 6.4 release toolchain via swiftly
SDK built from Xcode_27.xip (build 27A266a) with xtool sdk install
What would fix it properly
A Mach-O linker that knows the 27-series SDK's targets — either a newer bundled LLD, or a patch to the copy that ships. Worth noting the timing: the 27-series SDK becomes the only accepted one for App Store uploads in April 2027, so anyone building iOS from Linux will meet this.
Thanks for flagging. For some reason I didn't run into this in my own testing, but it checks out (EDIT: I must have been using a beta build of Xcode 27!) There's an upstream fix at llvm/llvm-project#222721. I'll pull this into darwin-tools-linux-llvm.
Activity
kabiroberai commentedon Sep 21, 2026
Thanks for flagging. For some reason I didn't run into this in my own testing, but it checks out (EDIT: I must have been using a beta build of Xcode 27!) There's an upstream fix at llvm/llvm-project#222721. I'll pull this into darwin-tools-linux-llvm.
kabiroberai commentedon Sep 21, 2026
This will be fixed by #270
sdk: update darwin-tools and OAM (xtool-org#270)