]>
Commit | Line | Data |
---|---|---|
7453a54e SL |
1 | // Copyright 2014 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 | ||
cc61c64b | 11 | use LinkerFlavor; |
2c00a5a8 | 12 | use target::{Target, TargetResult}; |
7453a54e | 13 | |
5bcae85e | 14 | pub fn target() -> TargetResult { |
2c00a5a8 XL |
15 | let mut base = super::linux_musl_base::opts(); |
16 | base.cpu = "mips32r2".to_string(); | |
17 | base.features = "+mips32r2,+soft-float".to_string(); | |
18 | base.max_atomic_width = Some(32); | |
19 | // see #36994 | |
20 | base.exe_allocation_crate = None; | |
21 | base.crt_static_default = false; | |
5bcae85e | 22 | Ok(Target { |
7453a54e SL |
23 | llvm_target: "mips-unknown-linux-musl".to_string(), |
24 | target_endian: "big".to_string(), | |
25 | target_pointer_width: "32".to_string(), | |
ea8adc8c | 26 | target_c_int_width: "32".to_string(), |
54a0048b | 27 | data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), |
7453a54e SL |
28 | arch: "mips".to_string(), |
29 | target_os: "linux".to_string(), | |
30 | target_env: "musl".to_string(), | |
31 | target_vendor: "unknown".to_string(), | |
cc61c64b | 32 | linker_flavor: LinkerFlavor::Gcc, |
2c00a5a8 | 33 | options: base, |
5bcae85e | 34 | }) |
7453a54e | 35 | } |