]>
Commit | Line | Data |
---|---|---|
85aaf69f | 1 | // Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT |
1a4d82fc JJ |
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 | ||
12 | use target_strs; | |
13 | use syntax::abi; | |
14 | ||
15 | pub fn get_target_strs(target_triple: String, target_os: abi::Os) -> target_strs::t { | |
16 | return target_strs::t { | |
17 | module_asm: "".to_string(), | |
18 | ||
19 | data_layout: match target_os { | |
20 | abi::OsMacos => { | |
21 | "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-\ | |
22 | f32:32:32-f64:64:64-v64:64:64-v128:128:128-a:0:64-\ | |
23 | s0:64:64-f80:128:128-n8:16:32:64".to_string() | |
24 | } | |
25 | ||
26 | abi::OsiOS => { | |
27 | "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-\ | |
28 | f32:32:32-f64:64:64-v64:64:64-v128:128:128-a:0:64-\ | |
29 | s0:64:64-f80:128:128-n8:16:32:64".to_string() | |
30 | } | |
31 | ||
32 | abi::OsWindows => { | |
33 | // FIXME: Test this. Copied from Linux (#2398) | |
34 | "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-\ | |
35 | f32:32:32-f64:64:64-v64:64:64-v128:128:128-a:0:64-\ | |
36 | s0:64:64-f80:128:128-n8:16:32:64-S128".to_string() | |
37 | } | |
38 | ||
39 | abi::OsLinux => { | |
40 | "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-\ | |
41 | f32:32:32-f64:64:64-v64:64:64-v128:128:128-a:0:64-\ | |
42 | s0:64:64-f80:128:128-n8:16:32:64-S128".to_string() | |
43 | } | |
44 | abi::OsAndroid => { | |
45 | "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-\ | |
46 | f32:32:32-f64:64:64-v64:64:64-v128:128:128-a:0:64-\ | |
47 | s0:64:64-f80:128:128-n8:16:32:64-S128".to_string() | |
48 | } | |
49 | ||
c34b1796 | 50 | abi::OsFreebsd | abi::OsDragonfly | abi::OsBitrig | abi::OsOpenbsd => { |
85aaf69f SL |
51 | "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-\ |
52 | f32:32:32-f64:64:64-v64:64:64-v128:128:128-a:0:64-\ | |
53 | s0:64:64-f80:128:128-n8:16:32:64-S128".to_string() | |
54 | } | |
1a4d82fc JJ |
55 | |
56 | }, | |
57 | ||
58 | target_triple: target_triple, | |
59 | ||
60 | cc_args: vec!("-m64".to_string()), | |
61 | }; | |
62 | } |