]> git.lizzy.rs Git - rust.git/blob - src/librustc_back/target/i686_unknown_linux_musl.rs
Rollup merge of #32150 - steveklabnik:gh20213, r=bluss
[rust.git] / src / librustc_back / target / i686_unknown_linux_musl.rs
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
11 // See x86_64_unknown_linux_musl for explanation of arguments
12
13 use target::Target;
14
15 pub fn target() -> Target {
16     let mut base = super::linux_base::opts();
17     base.cpu = "pentium4".to_string();
18     base.pre_link_args.push("-m32".to_string());
19     base.pre_link_args.push("-Wl,-melf_i386".to_string());
20
21     base.pre_link_args.push("-nostdlib".to_string());
22     base.pre_link_args.push("-static".to_string());
23     base.pre_link_args.push("-Wl,--eh-frame-hdr".to_string());
24
25     base.pre_link_args.push("-Wl,-(".to_string());
26     base.post_link_args.push("-Wl,-)".to_string());
27
28     base.pre_link_objects_exe.push("crt1.o".to_string());
29     base.pre_link_objects_exe.push("crti.o".to_string());
30     base.post_link_objects.push("crtn.o".to_string());
31
32     base.dynamic_linking = false;
33     base.has_rpath = false;
34     base.position_independent_executables = false;
35
36     Target {
37         llvm_target: "i686-unknown-linux-musl".to_string(),
38         target_endian: "little".to_string(),
39         target_pointer_width: "32".to_string(),
40         arch: "x86".to_string(),
41         target_os: "linux".to_string(),
42         target_env: "musl".to_string(),
43         target_vendor: "unknown".to_string(),
44         options: base,
45     }
46 }