-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
target: add arm64e-apple-visionos #155715
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
Changes from 3 commits
c22da98
f5c2057
3b51a6b
429e08b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| use crate::spec::base::apple::{Arch, TargetEnv, base}; | ||
| use crate::spec::{Os, SanitizerSet, Target, TargetMetadata, TargetOptions}; | ||
|
|
||
| pub(crate) fn target() -> Target { | ||
| let (opts, llvm_target, arch) = base(Os::VisionOs, Arch::Arm64e, TargetEnv::Normal); | ||
| Target { | ||
| llvm_target, | ||
| metadata: TargetMetadata { | ||
| description: Some("ARM64e Apple visionOS".into()), | ||
| tier: Some(3), | ||
| host_tools: Some(false), | ||
| std: Some(true), | ||
| }, | ||
| pointer_width: 64, | ||
| data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n32:64-S128-Fn32" | ||
| .into(), | ||
| arch, | ||
| options: TargetOptions { | ||
| features: "+neon,+apple-a12,+v8.3a,+paca,+pacg".into(), | ||
| max_atomic_width: Some(128), | ||
| supported_sanitizers: SanitizerSet::ADDRESS | SanitizerSet::THREAD, | ||
| ..opts | ||
| }, | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -292,6 +292,7 @@ target | std | host | notes | |||||
| [`arm64e-apple-darwin`](platform-support/arm64e-apple-darwin.md) | ✓ | ✓ | ARM64e Apple Darwin | ||||||
| [`arm64e-apple-ios`](platform-support/arm64e-apple-ios.md) | ✓ | | ARM64e Apple iOS | ||||||
| [`arm64e-apple-tvos`](platform-support/arm64e-apple-tvos.md) | ✓ | | ARM64e Apple tvOS | ||||||
| [`arm64e-apple-visionos`](platform-support/arm64e-apple-visionos.md) | ✓ | | arm64e Apple visionOS | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit:
Suggested change
|
||||||
| [`armeb-unknown-linux-gnueabi`](platform-support/armeb-unknown-linux-gnueabi.md) | ✓ | ? | Arm BE8 the default Arm big-endian architecture since [Armv6](https://developer.arm.com/documentation/101754/0616/armlink-Reference/armlink-Command-line-Options/--be8?lang=en). | ||||||
| [`armebv7r-none-eabi`](platform-support/armebv7r-none-eabi.md) | * | | Bare Armv7-R, Big Endian | ||||||
| [`armebv7r-none-eabihf`](platform-support/armebv7r-none-eabi.md) | * | | Bare Armv7-R, Big Endian, hardfloat | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,46 @@ | ||||||
| # `arm64e-apple-visionos` | ||||||
|
|
||||||
| **Tier: 3** | ||||||
|
|
||||||
| Apple arm64e visionOS. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit:
Suggested change
|
||||||
|
|
||||||
| ## Target maintainers | ||||||
|
|
||||||
| [@cypherair](https://github.com/cypherair) | ||||||
|
|
||||||
| ## Requirements | ||||||
|
|
||||||
| This target is cross-compiled and supports `std`. | ||||||
|
|
||||||
| This target requires the visionOS SDK provided by Xcode. | ||||||
|
|
||||||
| The deployment target can be configured with `XROS_DEPLOYMENT_TARGET`. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you refer to |
||||||
|
|
||||||
| ## Building the target | ||||||
|
|
||||||
| You can build Rust with support for the target by adding it to the `target` | ||||||
| list in `bootstrap.toml`: | ||||||
| ```toml | ||||||
| [build] | ||||||
| target = ["arm64e-apple-visionos"] | ||||||
| ``` | ||||||
|
|
||||||
| ## Building Rust programs | ||||||
|
|
||||||
| Rust does not yet ship pre-compiled artifacts for this target. | ||||||
| To compile for this target, you will need to build Rust with the target enabled. | ||||||
|
|
||||||
| ## Testing | ||||||
|
|
||||||
| This target is not tested by Rust CI. | ||||||
|
|
||||||
| Binaries are intended to run on visionOS devices with `arm64e` architecture. | ||||||
|
|
||||||
| The visionOS simulator targets use `arm64`, not `arm64e`. | ||||||
|
|
||||||
| ## Cross-compilation toolchains and C code | ||||||
|
|
||||||
| C code should be built with Apple's Clang from Xcode, using the visionOS SDK and | ||||||
| matching deployment target. | ||||||
|
|
||||||
| The Clang target is suffixed with `-xros`. | ||||||
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.
Nit: Don't remove the comment.