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

Add arm64-ios & arm64-tvos runtime packs for simulator and produce new runtime packs #48216

Closed
marek-safar opened this issue Feb 12, 2021 · 11 comments
Assignees
Milestone

Comments

@marek-safar
Copy link
Contributor

marek-safar commented Feb 12, 2021

We need a different build for ios simulator running on M1 machines. It has the same arch as 64 bits iOS bit the native assets cannot be shared. This is something that Apple might change in the future though.

I'd suggest deriving it from the existing ios-arm64 RID.

/cc @rolfbjarne

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Feb 12, 2021
@marek-safar marek-safar added area-Build-mono and removed untriaged New issue has not been triaged by the area owner labels Feb 12, 2021
@marek-safar marek-safar added this to the 6.0.0 milestone Feb 12, 2021
@steveisok steveisok assigned directhex and unassigned steveisok Mar 3, 2021
@directhex
Copy link
Contributor

To confirm my understanding of the issue:

  • Currently, ios-x64 means "Simulator" and ios-arm64 means "Device"
  • But on M1, the Simulator is arm64
  • The Simulator and Device runtimes differ in ways other than the CPU architecture, so we need both ios-arm64-device and ios-arm64-simulator configurations

Should we also rename ios-x64 to unify with whatever ios-arm64-simulator ends up looking like? I know there's not a huge likelihood of ios-x64-device being a thing that exists

@steveisok
Copy link
Member

Your understanding is my understanding.

I think having ios-arch-simulator packs makes a lot of sense. So, yes, I would support an x64 rename.

@marek-safar
Copy link
Contributor Author

I agree we should not suffix with -device and that it should be the shorter rid. I'm thinking about

ios-x64-sim
ios-arm64-sim

This also means we need to change existing RIDs

@directhex
Copy link
Contributor

Looking at it, the precedent we have for sub-variants is Alpine Linux, i.e. linux-x64 -> linux-musl-x64. As far as the build system goes, it's easier to declare "ios-sim is a variant of ios" than "x64-sim is a variant of x64"

@steveisok
Copy link
Member

If I understand the RID structure correctly, I think that shouldn't hurt us either way.

@directhex
Copy link
Contributor

Does this discussion also apply to tvOS?

@marek-safar
Copy link
Contributor Author

Does this discussion also apply to tvOS?

Yes

@steveisok steveisok changed the title Add arm64-ios runtime pack for simulator and produce new runtime pack Add arm64-ios & arm64-tvos runtime packs for simulator and produce new runtime packs Mar 4, 2021
@directhex
Copy link
Contributor

Related: dotnet/llvm-project#99

@directhex
Copy link
Contributor

directhex commented Mar 5, 2021 via email

@marek-safar
Copy link
Contributor Author

Considering we didn't ship anything for these rid I'd be fine with that but please make this separate PR and we can double-check during the review.

directhex added a commit to dotnet/icu that referenced this issue Mar 10, 2021
steveisok pushed a commit that referenced this issue Mar 19, 2021
Previously, we have had four iOS RIDs:

iOS-arm
iOS-arm64
iOS-x86
iOS-x64

Apple has never shipped an iOS device with an x86 or x64 processor. Instead, the x86/x64 RIDs have meant "iOS simulator with these arches" as opposed to "iOS with these arches". Amongst other things, that means building against a DIFFERENT SDK, iPhoneSimulator.platform vs iPhoneOS.platform

In the Apple Silicon future, the iOS simulator is now an ARM64 binary - so we need:

iOS-arm
iOS-arm64
iOS-arm64, but built against the simulator SDK not the device SDK
iOS-x86
iOS-x64
Clearly, there's a problem.

The solution is to move the simulators to a different RID, to avoid the overloading issue:

iOS-arm
iOS-arm64
iOSSimulator-arm64
iOSSimulator-x86
iOSSimulator-x64

This PR introduces the new entries in the RID graph, moves our existing iOS-x{86,64} to iOS-sim-x{86,64}, adds a new iOS-arm64.

The above also applies for tvOS, with a smaller set of OSes:

tvOS-arm64
tvOSSimulator-arm64
tvOSSimulator-x64

Ref: #48216
@ghost ghost locked as resolved and limited conversation to collaborators Apr 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants