-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
10 changed files
with
112 additions
and
18 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
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
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
30 changes: 30 additions & 0 deletions
30
compiler/rustc_target/src/spec/targets/arm64e_apple_ios.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,30 @@ | ||
use super::apple_base::{ios_llvm_target, opts, Arch}; | ||
use crate::spec::{FramePointer, SanitizerSet, Target, TargetOptions}; | ||
|
||
pub fn target() -> Target { | ||
let arch = Arch::Arm64e; | ||
let mut base = opts("ios", arch); | ||
base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::THREAD; | ||
|
||
Target { | ||
llvm_target: ios_llvm_target(arch).into(), | ||
pointer_width: 64, | ||
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(), | ||
arch: arch.target_arch(), | ||
options: TargetOptions { | ||
features: "+neon,+fp-armv8,+apple-a12,+v8.3a,+paca,+pacg".into(), | ||
max_atomic_width: Some(128), | ||
forces_embed_bitcode: true, | ||
frame_pointer: FramePointer::NonLeaf, | ||
bitcode_llvm_cmdline: "-triple\0\ | ||
arm64e-apple-ios14.1.0\0\ | ||
-emit-obj\0\ | ||
-disable-llvm-passes\0\ | ||
-target-abi\0\ | ||
darwinpcs\0\ | ||
-Os\0" | ||
.into(), | ||
..base | ||
}, | ||
} | ||
} |
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-ios` | ||
|
||
**Tier: 3** | ||
|
||
ARM64e iOS (12.0+) | ||
|
||
## Target maintainers | ||
|
||
- Artyom Tetyukhin ([@arttet](https://github.com/https://github.com/arttet)) | ||
|
||
## Requirements | ||
|
||
These targets only support cross-compilation. | ||
The targets do support `std`. | ||
|
||
## 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-ios" ] | ||
``` | ||
|
||
## 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 iOS 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