]> 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 798b5eadef4b79e1c3810776a21ef5ec50681c8e..7a7d248a4cbf55db065ee1f1e0aa7ec331af5365 100644 (file)
@@ -9,60 +9,64 @@
 // except according to those terms.
 
 use back::target_strs;
-use driver::session::sess_os_to_meta_os;
-use metadata::loader::meta_section_name;
 use syntax::abi;
 
-pub fn get_target_strs(target_triple: ~str, target_os: abi::Os) -> target_strs::t {
-    let cc_args = if target_triple.contains("thumb") {
-        vec!("-mthumb".to_owned())
+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_string())
     } else {
-        vec!("-marm".to_owned())
+        vec!("-marm".to_string())
     };
     return target_strs::t {
-        module_asm: "".to_owned(),
-
-        meta_sect_name: meta_section_name(sess_os_to_meta_os(target_os)).to_owned(),
+        module_asm: "".to_string(),
 
         data_layout: match target_os {
           abi::OsMacos => {
-            "e-p:32:32:32".to_owned() +
-                "-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"
+            "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::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 => {
-            "e-p:32:32:32".to_owned() +
-                "-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"
+            "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::OsLinux => {
-            "e-p:32:32:32".to_owned() +
-                "-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"
+            "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::OsAndroid => {
-            "e-p:32:32:32".to_owned() +
-                "-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"
+            "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::OsFreebsd => {
-            "e-p:32:32:32".to_owned() +
-                "-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"
+            "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()
           }
         },