Skip to content

Use clang when cross-compiling to iOS targets #577

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

Merged
merged 2 commits into from
Jan 26, 2021

Conversation

byteallen
Copy link
Contributor

This change allows the target flags to be set correctly when building for Mac Catalyst.

src/lib.rs Outdated
@@ -2044,6 +2044,8 @@ impl Build {
} else {
format!("{}.exe", gnu)
}
} else if target.contains("ios") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this perhaps use -ios- as a search string to be a bit more flexible? The string "ios" is a little short unfortunately...

Copy link
Contributor Author

@byteallen byteallen Jan 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS has 7 different targets. See platform-support.

  • aarch64-apple-ios
  • x86_64-apple-ios
  • aarch64-apple-ios-macabi
  • armv7-apple-ios
  • armv7s-apple-ios
  • i386-apple-ios
  • x86_64-apple-ios-macabi

It looks like apple-ios is the better choice.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@alexcrichton alexcrichton merged commit 9900373 into rust-lang:master Jan 26, 2021
@byteallen byteallen deleted the ios-cross-compiling branch January 27, 2021 03:11
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.

2 participants