]> git.lizzy.rs Git - rust.git/blob - src/librustc/back/arm.rs
Add generation of static libraries to rustc
[rust.git] / src / librustc / back / arm.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 use back::target_strs;
12 use driver::session::sess_os_to_meta_os;
13 use metadata::loader::meta_section_name;
14 use syntax::abi;
15
16 pub fn get_target_strs(target_triple: ~str, target_os: abi::Os) -> target_strs::t {
17     return target_strs::t {
18         module_asm: ~"",
19
20         meta_sect_name: meta_section_name(sess_os_to_meta_os(target_os)).to_owned(),
21
22         data_layout: match target_os {
23           abi::OsMacos => {
24             ~"e-p:32:32:32" +
25                 "-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64" +
26                 "-f32:32:32-f64:64:64" +
27                 "-v64:64:64-v128:64:128" +
28                 "-a0:0:64-n32"
29           }
30
31           abi::OsWin32 => {
32             ~"e-p:32:32:32" +
33                 "-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64" +
34                 "-f32:32:32-f64:64:64" +
35                 "-v64:64:64-v128:64:128" +
36                 "-a0:0:64-n32"
37           }
38
39           abi::OsLinux => {
40             ~"e-p:32:32:32" +
41                 "-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64" +
42                 "-f32:32:32-f64:64:64" +
43                 "-v64:64:64-v128:64:128" +
44                 "-a0:0:64-n32"
45           }
46
47           abi::OsAndroid => {
48             ~"e-p:32:32:32" +
49                 "-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64" +
50                 "-f32:32:32-f64:64:64" +
51                 "-v64:64:64-v128:64:128" +
52                 "-a0:0:64-n32"
53           }
54
55           abi::OsFreebsd => {
56             ~"e-p:32:32:32" +
57                 "-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64" +
58                 "-f32:32:32-f64:64:64" +
59                 "-v64:64:64-v128:64:128" +
60                 "-a0:0:64-n32"
61           }
62         },
63
64         target_triple: target_triple,
65
66         cc_args: ~[~"-marm"],
67     };
68 }