]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_target/src/spec/x86_64_apple_darwin.rs
New upstream version 1.49.0~beta.4+dfsg1
[rustc.git] / compiler / rustc_target / src / spec / x86_64_apple_darwin.rs
index 909aebec70b58766a1f26d55b7f6b2828903049e..edb33fe6e2b13a06dc1f822fa8fadd68f1496691 100644 (file)
@@ -1,7 +1,7 @@
-use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
+use crate::spec::{LinkerFlavor, Target, TargetOptions};
 
-pub fn target() -> TargetResult {
-    let mut base = super::apple_base::opts();
+pub fn target() -> Target {
+    let mut base = super::apple_base::opts("macos");
     base.cpu = "core2".to_string();
     base.max_atomic_width = Some(128); // core2 support cmpxchg16b
     base.eliminate_frame_pointer = false;
@@ -18,18 +18,12 @@ pub fn target() -> TargetResult {
     let arch = "x86_64";
     let llvm_target = super::apple_base::macos_llvm_target(&arch);
 
-    Ok(Target {
+    Target {
         llvm_target,
-        target_endian: "little".to_string(),
-        target_pointer_width: "64".to_string(),
-        target_c_int_width: "32".to_string(),
+        pointer_width: 64,
         data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
             .to_string(),
         arch: arch.to_string(),
-        target_os: "macos".to_string(),
-        target_env: String::new(),
-        target_vendor: "apple".to_string(),
-        linker_flavor: LinkerFlavor::Gcc,
-        options: TargetOptions { target_mcount: "\u{1}mcount".to_string(), ..base },
-    })
+        options: TargetOptions { mcount: "\u{1}mcount".to_string(), ..base },
+    }
 }