1 // Copyright 2015 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.
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.
12 use super::{LinkArgs, Target, TargetOptions, TargetResult};
14 pub fn target() -> TargetResult {
15 let mut pre_link_args = LinkArgs::new();
16 pre_link_args.insert(LinkerFlavor::Gcc,
17 vec!["--pnacl-exceptions=sjlj".to_string(),
18 "--target=le32-unknown-nacl".to_string(),
19 "-Wl,--start-group".to_string()]);
20 let mut post_link_args = LinkArgs::new();
21 post_link_args.insert(LinkerFlavor::Gcc,
22 vec!["-Wl,--end-group".to_string()]);
24 let opts = TargetOptions {
25 linker: "pnacl-clang".to_string(),
26 ar: "pnacl-ar".to_string(),
30 dynamic_linking: false,
32 exe_suffix: ".pexe".to_string(),
35 max_atomic_width: Some(32),
39 llvm_target: "le32-unknown-nacl".to_string(),
40 target_endian: "little".to_string(),
41 target_pointer_width: "32".to_string(),
42 target_c_int_width: "32".to_string(),
43 target_os: "nacl".to_string(),
44 target_env: "newlib".to_string(),
45 target_vendor: "unknown".to_string(),
46 data_layout: "e-i64:64:64-p:32:32:32-v128:32:32".to_string(),
47 arch: "le32".to_string(),
48 linker_flavor: LinkerFlavor::Gcc,