]> git.proxmox.com Git - rustc.git/blame - src/librustc_back/target/le32_unknown_nacl.rs
New upstream version 1.12.0+dfsg1
[rustc.git] / src / librustc_back / target / le32_unknown_nacl.rs
CommitLineData
b039eaaf
SL
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.
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
5bcae85e 11use super::{Target, TargetOptions, TargetResult};
b039eaaf 12
5bcae85e 13pub fn target() -> TargetResult {
b039eaaf
SL
14 let opts = TargetOptions {
15 linker: "pnacl-clang".to_string(),
16 ar: "pnacl-ar".to_string(),
17
18 pre_link_args: vec!("--pnacl-exceptions=sjlj".to_string(),
19 "--target=le32-unknown-nacl".to_string(),
20 "-Wl,--start-group".to_string()),
21 post_link_args: vec!("-Wl,--end-group".to_string()),
22 dynamic_linking: false,
23 executables: true,
24 exe_suffix: ".pexe".to_string(),
25 no_compiler_rt: false,
26 linker_is_gnu: true,
27 allow_asm: false,
a7813a04 28 max_atomic_width: 32,
b039eaaf
SL
29 .. Default::default()
30 };
5bcae85e 31 Ok(Target {
b039eaaf
SL
32 llvm_target: "le32-unknown-nacl".to_string(),
33 target_endian: "little".to_string(),
34 target_pointer_width: "32".to_string(),
35 target_os: "nacl".to_string(),
36 target_env: "newlib".to_string(),
37 target_vendor: "unknown".to_string(),
54a0048b 38 data_layout: "e-i64:64:64-p:32:32:32-v128:32:32".to_string(),
b039eaaf
SL
39 arch: "le32".to_string(),
40 options: opts,
5bcae85e 41 })
b039eaaf 42}