]> git.proxmox.com Git - rustc.git/blame - src/librustc_back/x86.rs
Imported Upstream version 1.2.0+dfsg1
[rustc.git] / src / librustc_back / x86.rs
CommitLineData
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
12use target_strs;
13use syntax::abi;
14
15pub fn get_target_strs(target_triple: String, target_os: abi::Os)
16 -> target_strs::t {
17 return target_strs::t {
18 module_asm: "".to_string(),
19
20 data_layout: match target_os {
21 abi::OsMacos => {
22 "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16\
23 -i32:32:32-i64:32:64\
24 -f32:32:32-f64:32:64-v64:64:64\
25 -v128:128:128-a:0:64-f80:128:128\
26 -n8:16:32".to_string()
27 }
28
29 abi::OsiOS => {
30 "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16\
31 -i32:32:32-i64:32:64\
32 -f32:32:32-f64:32:64-v64:64:64\
33 -v128:128:128-a:0:64-f80:128:128\
34 -n8:16:32".to_string()
35 }
36
37 abi::OsWindows => {
38 "e-p:32:32-f64:64:64-i64:64:64-f80:32:32-n8:16:32".to_string()
39 }
40
41 abi::OsLinux => {
42 "e-p:32:32-f64:32:64-i64:32:64-f80:32:32-n8:16:32".to_string()
43 }
44 abi::OsAndroid => {
45 "e-p:32:32-f64:32:64-i64:32:64-f80:32:32-n8:16:32".to_string()
46 }
47
c34b1796 48 abi::OsFreebsd | abi::OsDragonfly | abi::OsBitrig | abi::OsOpenbsd => {
85aaf69f
SL
49 "e-p:32:32-f64:32:64-i64:32:64-f80:32:32-n8:16:32".to_string()
50 }
1a4d82fc
JJ
51
52 },
53
54 target_triple: target_triple,
55
56 cc_args: vec!("-m32".to_string()),
57 };
58}