-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 arm64e-apple-tvos target #130614
Merged
Merged
Add arm64e-apple-tvos target #130614
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
compiler/rustc_target/src/spec/targets/arm64e_apple_tvos.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use crate::spec::base::apple::{base, Arch, TargetAbi}; | ||
use crate::spec::{FramePointer, Target, TargetOptions}; | ||
|
||
pub(crate) fn target() -> Target { | ||
let (opts, llvm_target, arch) = base("tvos", Arch::Arm64e, TargetAbi::Normal); | ||
Target { | ||
llvm_target, | ||
metadata: crate::spec::TargetMetadata { | ||
description: Some("ARM64e Apple tvOS".into()), | ||
tier: Some(3), | ||
host_tools: Some(false), | ||
std: Some(true), | ||
}, | ||
pointer_width: 64, | ||
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128-Fn32".into(), | ||
arch, | ||
options: TargetOptions { | ||
features: "+neon,+fp-armv8,+apple-a12,+v8.3a,+pauth".into(), | ||
max_atomic_width: Some(128), | ||
frame_pointer: FramePointer::NonLeaf, | ||
..opts | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# `arm64e-apple-tvos` | ||
|
||
**Tier: 3** | ||
|
||
ARM64e tvOS (10.0+) | ||
|
||
## Target maintainers | ||
|
||
- Artyom Tetyukhin ([@arttet](https://github.com/https://github.com/arttet)) | ||
|
||
## Requirements | ||
|
||
This target is cross-compiled and supports `std`. | ||
To build this target Xcode 12 or higher on macOS is required. | ||
|
||
## Building the target | ||
|
||
You can build Rust with support for the targets by adding it to the `target` list in `config.toml`: | ||
|
||
```toml | ||
[build] | ||
target = [ "arm64e-apple-tvos" ] | ||
``` | ||
|
||
## 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 (see [Building the target](#building-the-target) above). | ||
|
||
## Testing | ||
|
||
The target does support running binaries on tvOS platforms with `arm64e` architecture. | ||
|
||
## Cross-compilation toolchains and C code | ||
|
||
The targets do support `C` code. | ||
To build compatible `C` code, you have to use XCode with the same compiler and flags. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The aarch64-apple-tvos target spec omits "Apple" from the description, as does the aarch64-apple-ios target spec.
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.
We have the same description for arm64e_apple_darwin & arm64e_apple_ios.
I can remove it if it needs
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.
If other targets are already inconsistent, I don't think you need to make them consistent in this PR.