Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the broken cross-compile command with Xcode15 SDK #51

Merged

Conversation

pewsheen
Copy link
Contributor

@pewsheen pewsheen commented Aug 1, 2023

The original issue is from Tauri#7339: tauri-apps/tauri#7339

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.

A mini repository for testing this patch: https://github.com/pewsheen/swift-xcode15-cross-compile

@lucasfernog
Copy link
Contributor

Still works at least on my setup (not using Xcode 15 yet).

@Brendonovich Brendonovich merged commit 03d5b7b into Brendonovich:master Aug 3, 2023
2 checks passed
@pewsheen pewsheen deleted the xcode-15-cross-compile-ios branch August 3, 2023 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants