The cross-compilation is broken with Xcode15 SDK. swift can't find the ios target's standard library.
error: unable to load standard library for target 'arm64-apple-ios13.0-simulator'
After some tries between Xcode14 and 15 SDK, I found that swift 5.9 (shipped with Xcode15) always seemed to use MacOSX SDK. So I try specified the SDK path for the swift build, and it successfully built the iOS target.
I tested this patch on my macOS 14.0 and for cross-compiling iOS targets only (with Xcode14, 15 SDK). So I need someone to help test if the patch broke something on other use cases.
The original issue is from Tauri#7339: https://github.com/tauri-apps/tauri/issues/7339
The cross-compilation is broken with Xcode15 SDK.
swift
can't find the ios target's standard library.After some tries between Xcode14 and 15 SDK, I found that
swift
5.9 (shipped with Xcode15) always seemed to use MacOSX SDK. So I try specified the SDK path for theswift build
, and it successfully built the iOS target.I tested this patch on my macOS 14.0 and for cross-compiling iOS targets only (with Xcode14, 15 SDK). So I need someone to help test if the patch broke something on other use cases.
A mini repository for testing this patch: https://github.com/pewsheen/swift-xcode15-cross-compile