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.
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.
12 use back::target_strs;
13 use driver::session::sess_os_to_meta_os;
15 use metadata::loader::meta_section_name;
17 pub fn get_target_strs(target_os: session::os) -> target_strs::t {
18 return target_strs::t {
21 meta_sect_name: meta_section_name(sess_os_to_meta_os(target_os)),
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"
31 session::os_win32 => {
32 ~"e-p:32:32-f64:64:64-i64:64:64-f80:32:32-n8:16:32"
35 session::os_linux => {
36 ~"e-p:32:32-f64:32:64-i64:32:64-f80:32:32-n8:16:32"
38 session::os_android => {
39 ~"e-p:32:32-f64:32:64-i64:32:64-f80:32:32-n8:16:32"
42 session::os_freebsd => {
43 ~"e-p:32:32-f64:32:64-i64:32:64-f80:32:32-n8:16:32"
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"