]> git.proxmox.com Git - rustc.git/blame - compiler/rustc_target/src/spec/i686_apple_darwin.rs
New upstream version 1.49.0~beta.4+dfsg1
[rustc.git] / compiler / rustc_target / src / spec / i686_apple_darwin.rs
CommitLineData
29967ef6 1use crate::spec::{LinkerFlavor, Target, TargetOptions};
1a4d82fc 2
29967ef6
XL
3pub fn target() -> Target {
4 let mut base = super::apple_base::opts("macos");
85aaf69f 5 base.cpu = "yonah".to_string();
c30ab7b3 6 base.max_atomic_width = Some(64);
cc61c64b 7 base.pre_link_args.insert(LinkerFlavor::Gcc, vec!["-m32".to_string()]);
e1599b0c 8 base.link_env_remove.extend(super::apple_base::macos_link_env_remove());
041b39d2 9 base.stack_probes = true;
83c7162d 10 base.eliminate_frame_pointer = false;
1a4d82fc 11
48663c56
XL
12 // Clang automatically chooses a more specific target based on
13 // MACOSX_DEPLOYMENT_TARGET. To enable cross-language LTO to work
14 // correctly, we do too.
15 let arch = "i686";
16 let llvm_target = super::apple_base::macos_llvm_target(&arch);
17
29967ef6 18 Target {
ba9703b0 19 llvm_target,
29967ef6 20 pointer_width: 32,
dfeec247
XL
21 data_layout: "e-m:o-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
22 f64:32:64-f80:128-n8:16:32-S128"
23 .to_string(),
1a4d82fc 24 arch: "x86".to_string(),
29967ef6
XL
25 options: TargetOptions { mcount: "\u{1}mcount".to_string(), ..base },
26 }
1a4d82fc 27}