]> git.lizzy.rs Git - rust.git/blob - src/librustc/back/x86.rs
Remove 'Local Variable' comments
[rust.git] / src / librustc / back / x86.rs
1 // Copyright 2012 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
12 use back::target_strs;
13 use driver::session::sess_os_to_meta_os;
14 use driver::session;
15 use metadata::loader::meta_section_name;
16
17 pub fn get_target_strs(target_os: session::os) -> target_strs::t {
18     return target_strs::t {
19         module_asm: ~"",
20
21         meta_sect_name: meta_section_name(sess_os_to_meta_os(target_os)),
22
23         data_layout: match target_os {
24           session::os_macos => {
25             ~"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16" +
26                 ~"-i32:32:32-i64:32:64" +
27                 ~"-f32:32:32-f64:32:64-v64:64:64" +
28                 ~"-v128:128:128-a0:0:64-f80:128:128" + ~"-n8:16:32"
29           }
30
31           session::os_win32 => {
32             ~"e-p:32:32-f64:64:64-i64:64:64-f80:32:32-n8:16:32"
33           }
34
35           session::os_linux => {
36             ~"e-p:32:32-f64:32:64-i64:32:64-f80:32:32-n8:16:32"
37           }
38           session::os_android => {
39             ~"e-p:32:32-f64:32:64-i64:32:64-f80:32:32-n8:16:32"
40           }
41
42           session::os_freebsd => {
43             ~"e-p:32:32-f64:32:64-i64:32:64-f80:32:32-n8:16:32"
44           }
45         },
46
47         target_triple: match target_os {
48           session::os_macos => ~"i686-apple-darwin",
49           session::os_win32 => ~"i686-pc-mingw32",
50           session::os_linux => ~"i686-unknown-linux-gnu",
51           session::os_android => ~"i686-unknown-android-gnu",
52           session::os_freebsd => ~"i686-unknown-freebsd"
53         },
54
55         cc_args: ~[~"-m32"]
56     };
57 }