-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
72 additions
and
3 deletions.
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