forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
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 rust-lang#82166 - kaniini:s390x-musl-target, r=nagisa
add s390x-unknown-linux-musl target This is the first step in bringup for Rust on s390x. The libc and std crates need modifications as well, but getting this upstream makes that work easier.
- Loading branch information
Showing
3 changed files
with
26 additions
and
0 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/s390x_unknown_linux_musl.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::abi::Endian; | ||
use crate::spec::Target; | ||
|
||
pub fn target() -> Target { | ||
let mut base = super::linux_musl_base::opts(); | ||
base.endian = Endian::Big; | ||
// z10 is the oldest CPU supported by LLVM | ||
base.cpu = "z10".to_string(); | ||
// FIXME: The data_layout string below and the ABI implementation in | ||
// cabi_s390x.rs are for now hard-coded to assume the no-vector ABI. | ||
// Pass the -vector feature string to LLVM to respect this assumption. | ||
base.features = "-vector".to_string(); | ||
base.max_atomic_width = Some(64); | ||
base.min_global_align = Some(16); | ||
base.static_position_independent_executables = true; | ||
|
||
Target { | ||
llvm_target: "s390x-unknown-linux-musl".to_string(), | ||
pointer_width: 64, | ||
data_layout: "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-a:8:16-n32:64".to_string(), | ||
arch: "s390x".to_string(), | ||
options: 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