]> git.proxmox.com Git - rustc.git/blame - src/librustc_back/target/s390x_unknown_linux_gnu.rs
New upstream version 1.14.0+dfsg1
[rustc.git] / src / librustc_back / target / s390x_unknown_linux_gnu.rs
CommitLineData
9e0c209e
SL
1// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2// file at the top-level directory of this distribution and at
3// http://rust-lang.org/COPYRIGHT.
4//
5// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8// option. This file may not be copied, modified, or distributed
9// except according to those terms.
10
11use target::{Target, TargetResult};
12
13pub fn target() -> TargetResult {
14 let mut base = super::linux_base::opts();
15 // z10 is the oldest CPU supported by LLVM
16 base.cpu = "z10".to_string();
17 // FIXME: The data_layout string below and the ABI implementation in
18 // cabi_s390x.rs are for now hard-coded to assume the no-vector ABI.
19 // Pass the -vector feature string to LLVM to respect this assumption.
20 base.features = "-vector".to_string();
c30ab7b3 21 base.max_atomic_width = Some(64);
9e0c209e
SL
22
23 Ok(Target {
24 llvm_target: "s390x-unknown-linux-gnu".to_string(),
25 target_endian: "big".to_string(),
26 target_pointer_width: "64".to_string(),
27 data_layout: "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-a:8:16-n32:64".to_string(),
28 arch: "s390x".to_string(),
29 target_os: "linux".to_string(),
30 target_env: "gnu".to_string(),
31 target_vendor: "unknown".to_string(),
32 options: base,
33 })
34}