-
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.
Rollup merge of #103929 - BlackHoleFox:apple-targets-cleanup, r=petro…
…chenkov Cleanup Apple-related code in rustc_target While working on #103455, the consistency of the `rustc_target` code for Apple's platforms was "kind of bad." There were two "base" files (`apple_base.rs` and `apple_sdk_base.rs`) that the targets each pulled some parts out of, each and all of them were written slightly differently, and sometimes missed comments other implementations had. So to hopefully make future maintenance, like implementing rust-lang/compiler-team#556, easier, this makes all of them use similar patterns and the same target base logic everywhere instead of picking bits from both. This also has some other smaller upsides like less stringly-typed functions.
- Loading branch information
Showing
20 changed files
with
218 additions
and
221 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
use super::apple_sdk_base::{opts, Arch}; | ||
use super::apple_base::{opts, Arch}; | ||
use crate::spec::{FramePointer, Target, TargetOptions}; | ||
|
||
pub fn target() -> Target { | ||
let arch = Arch::Arm64; | ||
Target { | ||
llvm_target: "arm64-apple-tvos".into(), | ||
pointer_width: 64, | ||
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(), | ||
arch: "aarch64".into(), | ||
arch: arch.target_arch(), | ||
options: TargetOptions { | ||
features: "+neon,+fp-armv8,+apple-a7".into(), | ||
max_atomic_width: Some(128), | ||
forces_embed_bitcode: true, | ||
frame_pointer: FramePointer::NonLeaf, | ||
..opts("tvos", Arch::Arm64) | ||
..opts("tvos", arch) | ||
}, | ||
} | ||
} |
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.