-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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 aarch64-apple-visionos and aarch64-apple-visionos-sim tier 3 targets #121419
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
These commits modify compiler targets. This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp. |
This comment has been minimized.
This comment has been minimized.
There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged. You can start a rebase with the following commands:
The following commits are merge commits: |
This comment has been minimized.
This comment has been minimized.
Great work @agg23 |
@eugenehp It sounds like you might have built something incorrectly. Since you're using If you run (note, this needs to be the custom built toolchain's
amongst the other options. Beware that you cannot build If you want to work on visionOS now, I have published instructions on how to set it up. I have tested this both in the simulator and on an actual headset. |
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(), | ||
arch: arch.target_arch(), | ||
options: TargetOptions { | ||
features: "+neon,+fp-armv8,+apple-a7".into(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect that this can be much higher, possibly even apple-a15
or apple-m2
?
Same for the simulator target.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good point. Do you know how I would find out what is acceptable? Just poking around in LLVM?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am unsure why, but in use rustc
reports that apple-m1
is not a valid feature for this target. I see nothing obvious in the codebase where we whitelist LLVM architectures.
Reverting to the latest available in rustc
, apple-a16
Is there a recommended way for testing a no |
These commits modify the If this was unintentional then you should revert the changes before this PR is merged.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@agg23, appreciate if you could summarize what work remains before the above, i.e. |
I think you need You still have to use As far as I know that's all you need. |
If I run I get
|
The
Note that to do all of this, you'll need to also grab the changes from #123721 and #123723, as those are needed to build the compiler without warnings. Or you can wait until #123721 and rust-lang/libc#3568 are merged and released, and |
You definitely can do this with the shipping tier 3 compiler; no need to build Rust yourself. As far as I know, all I'm doing is running with |
I have never touched |
Is a build with no patches or xargo needed likely within days, or is it expected to take a lot longer? |
You will not need patches or |
The maintainer of libc is just one guy? That's a tad concerning, |
@agg23 jokes apart, might be a good thing to escalate this up the rust org. |
Various visionOS fixes A few small mistakes was introduced in rust-lang#121419, probably after the rename from `xros` to `visionos`. See the commits for details. CC `@agg23` Since you reviewed rust-lang#121419 r? davidtwco
Rollup merge of rust-lang#123721 - madsmtm:fix-visionos, r=davidtwco Various visionOS fixes A few small mistakes was introduced in rust-lang#121419, probably after the rename from `xros` to `visionos`. See the commits for details. CC `@agg23` Since you reviewed rust-lang#121419 r? davidtwco
Introduces
aarch64-apple-visionos
andaarch64-apple-visionos-sim
as tier 3 targets. This allows native development for the Apple Vision Pro's visionOS platform.This work has been tracked in rust-lang/compiler-team#642. There is a corresponding
libc
change rust-lang/libc#3568 that is not required for merge.Ideally we would be able to incorporate this change to the
object
crate, but the author has stated that a release will not be cut for quite a while. Therefore, the two locations that would reference the xrOS constant fromobject
are hardcoded to their MachO values of 11 and 12, accompanied by TODOs to mark the code as needing change. I am open to suggestions on what to do here to get this checked in.Tier 3 Target Policy
At this tier, the Rust project provides no official support for a target, so we place minimal requirements on the introduction of targets.
See src/doc/rustc/src/platform-support/apple-visionos.md
This naming scheme matches
$ARCH-$VENDOR-$OS-$ABI
which is matches the iOS Apple Silicon simulator (aarch64-apple-ios-sim
) and other Apple targets.This contribution is fully available under the standard Rust license with no additional legal restrictions whatsoever. This PR does not introduce any new dependency less permissive than the Rust license policy.
The new targets do not depend on proprietary libraries.
This new target mirrors the standard library for watchOS and iOS, with minor divergences.
Documentation is provided in src/doc/rustc/src/platform-support/apple-visionos.md
I acknowledge these requirements and intend to ensure that they are met.
This target does not touch any existing tier 2 or tier 1 targets and should not break any other targets.