]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/back/arm.rs
doc/guide-ffi: A few minor typo/language fixes
[rust.git] / src / librustc / back / arm.rs
index 0acee6dd1dfaeb369188ced777782e2eb2183aa3..7a7d248a4cbf55db065ee1f1e0aa7ec331af5365 100644 (file)
@@ -9,21 +9,16 @@
 // except according to those terms.
 
 use back::target_strs;
-use driver::config::cfg_os_to_meta_os;
-use metadata::loader::meta_section_name;
 use syntax::abi;
 
-pub fn get_target_strs(target_triple: StrBuf, target_os: abi::Os) -> target_strs::t {
+pub fn get_target_strs(target_triple: String, target_os: abi::Os) -> target_strs::t {
     let cc_args = if target_triple.as_slice().contains("thumb") {
-        vec!("-mthumb".to_strbuf())
+        vec!("-mthumb".to_string())
     } else {
-        vec!("-marm".to_strbuf())
+        vec!("-marm".to_string())
     };
     return target_strs::t {
-        module_asm: "".to_strbuf(),
-
-        meta_sect_name:
-            meta_section_name(cfg_os_to_meta_os(target_os)).to_strbuf(),
+        module_asm: "".to_string(),
 
         data_layout: match target_os {
           abi::OsMacos => {
@@ -31,7 +26,15 @@ pub fn get_target_strs(target_triple: StrBuf, target_os: abi::Os) -> target_strs
                 -i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64\
                 -f32:32:32-f64:64:64\
                 -v64:64:64-v128:64:128\
-                -a0:0:64-n32".to_strbuf()
+                -a0:0:64-n32".to_string()
+          }
+
+          abi::OsiOS => {
+            "e-p:32:32:32\
+                -i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64\
+                -f32:32:32-f64:64:64\
+                -v64:64:64-v128:64:128\
+                -a0:0:64-n32".to_string()
           }
 
           abi::OsWin32 => {
@@ -39,7 +42,7 @@ pub fn get_target_strs(target_triple: StrBuf, target_os: abi::Os) -> target_strs
                 -i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64\
                 -f32:32:32-f64:64:64\
                 -v64:64:64-v128:64:128\
-                -a0:0:64-n32".to_strbuf()
+                -a0:0:64-n32".to_string()
           }
 
           abi::OsLinux => {
@@ -47,7 +50,7 @@ pub fn get_target_strs(target_triple: StrBuf, target_os: abi::Os) -> target_strs
                 -i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64\
                 -f32:32:32-f64:64:64\
                 -v64:64:64-v128:64:128\
-                -a0:0:64-n32".to_strbuf()
+                -a0:0:64-n32".to_string()
           }
 
           abi::OsAndroid => {
@@ -55,7 +58,7 @@ pub fn get_target_strs(target_triple: StrBuf, target_os: abi::Os) -> target_strs
                 -i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64\
                 -f32:32:32-f64:64:64\
                 -v64:64:64-v128:64:128\
-                -a0:0:64-n32".to_strbuf()
+                -a0:0:64-n32".to_string()
           }
 
           abi::OsFreebsd => {
@@ -63,7 +66,7 @@ pub fn get_target_strs(target_triple: StrBuf, target_os: abi::Os) -> target_strs
                 -i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64\
                 -f32:32:32-f64:64:64\
                 -v64:64:64-v128:64:128\
-                -a0:0:64-n32".to_strbuf()
+                -a0:0:64-n32".to_string()
           }
         },