Skip to content

Commit a49592e

Browse files
committed
Make TargetOptions::link_args stateful lazy - part 3
Handle Apple targets
1 parent 9f6c856 commit a49592e

25 files changed

+62
-69
lines changed

compiler/rustc_target/src/spec/base/apple/mod.rs

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use std::{borrow::Cow, env};
22

3+
use crate::spec::link_args::LazyLinkArgsState;
34
use crate::spec::{add_link_args, add_link_args_iter, MaybeLazy};
45
use crate::spec::{cvs, Cc, DebuginfoKind, FramePointer, LinkArgs, LinkerFlavor, Lld};
56
use crate::spec::{SplitDebuginfo, StackProbeType, StaticCow, Target, TargetOptions};
@@ -94,7 +95,10 @@ impl TargetAbi {
9495
}
9596
}
9697

97-
pub fn pre_link_args(os: &'static str, arch: Arch, abi: TargetAbi) -> LinkArgs {
98+
pub(crate) type ApplePreLinkArgs =
99+
(/*os:*/ &'static str, /*arch:*/ Arch, /*abi:*/ TargetAbi);
100+
101+
pub(crate) fn pre_link_args((os, arch, abi): ApplePreLinkArgs) -> LinkArgs {
98102
let platform_name: StaticCow<str> = match abi {
99103
TargetAbi::Normal => os.into(),
100104
TargetAbi::Simulator => format!("{os}-simulator").into(),
@@ -114,7 +118,9 @@ pub fn pre_link_args(os: &'static str, arch: Arch, abi: TargetAbi) -> LinkArgs {
114118
};
115119
let sdk_version = min_version.clone();
116120

117-
let mut args = TargetOptions::link_args_base(
121+
let mut args = LinkArgs::new();
122+
add_link_args(
123+
&mut args,
118124
LinkerFlavor::Darwin(Cc::No, Lld::No),
119125
&["-arch", arch.target_name(), "-platform_version"],
120126
);
@@ -140,12 +146,7 @@ pub fn pre_link_args(os: &'static str, arch: Arch, abi: TargetAbi) -> LinkArgs {
140146
args
141147
}
142148

143-
pub fn opts(
144-
os: &'static str,
145-
arch: Arch,
146-
abi: TargetAbi,
147-
pre_link_args: MaybeLazy<LinkArgs, (LinkerFlavor, &'static [&'static str])>,
148-
) -> TargetOptions {
149+
pub fn opts(os: &'static str, arch: Arch, abi: TargetAbi) -> TargetOptions {
149150
TargetOptions {
150151
abi: abi.target_abi().into(),
151152
os: os.into(),
@@ -156,7 +157,7 @@ pub fn opts(
156157
// macOS has -dead_strip, which doesn't rely on function_sections
157158
function_sections: false,
158159
dynamic_linking: true,
159-
pre_link_args,
160+
pre_link_args: MaybeLazy::lazied(LazyLinkArgsState::Apple((os, arch, abi))),
160161
families: cvs!["unix"],
161162
is_like_osx: true,
162163
// LLVM notes that macOS 10.11+ and iOS 9+ default

compiler/rustc_target/src/spec/link_args.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ pub type LinkArgsCli = BTreeMap<LinkerFlavorCli, Vec<StaticCow<str>>>;
1111

1212
pub type LazyLinkArgs = MaybeLazy<LinkArgs, LazyLinkArgsState>;
1313

14-
pub(super) enum LazyLinkArgsState {
14+
pub enum LazyLinkArgsState {
1515
Simple(LinkerFlavor, &'static [&'static str]),
1616
List(&'static [(LinkerFlavor, &'static [&'static str])]),
17+
Apple(super::base::apple::ApplePreLinkArgs),
1718
}
1819

1920
impl FnOnce<()> for LazyLinkArgsState {
@@ -32,6 +33,7 @@ impl FnOnce<()> for LazyLinkArgsState {
3233
}
3334
link_args
3435
}
36+
LazyLinkArgsState::Apple(args) => super::base::apple::pre_link_args(args),
3537
}
3638
}
3739
}

compiler/rustc_target/src/spec/targets/aarch64_apple_darwin.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
use crate::spec::base::apple::{macos_llvm_target, opts, pre_link_args, Arch, TargetAbi};
1+
use crate::spec::base::apple::{macos_llvm_target, opts, Arch, TargetAbi};
22
use crate::spec::{FramePointer, MaybeLazy, SanitizerSet, Target, TargetOptions};
33

44
pub fn target() -> Target {
55
const ARCH: Arch = Arch::Arm64;
66
const OS: &'static str = "macos";
77
const ABI: TargetAbi = TargetAbi::Normal;
88

9-
let mut base = opts(OS, ARCH, ABI, MaybeLazy::lazy(|| pre_link_args(OS, ARCH, ABI)));
9+
let mut base = opts(OS, ARCH, ABI);
1010
base.cpu = "apple-m1".into();
1111
base.max_atomic_width = Some(128);
1212

compiler/rustc_target/src/spec/targets/aarch64_apple_ios.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
use crate::spec::base::apple::{ios_llvm_target, opts, pre_link_args, Arch, TargetAbi};
1+
use crate::spec::base::apple::{ios_llvm_target, opts, Arch, TargetAbi};
22
use crate::spec::{FramePointer, MaybeLazy, SanitizerSet, Target, TargetOptions};
33

44
pub fn target() -> Target {
55
const ARCH: Arch = Arch::Arm64;
66
const OS: &'static str = "ios";
77
const ABI: TargetAbi = TargetAbi::Normal;
88

9-
let mut base = opts(OS, ARCH, ABI, MaybeLazy::lazy(|| pre_link_args(OS, ARCH, ABI)));
9+
let mut base = opts(OS, ARCH, ABI);
1010
base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::THREAD;
1111

1212
Target {

compiler/rustc_target/src/spec/targets/aarch64_apple_ios_macabi.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
use crate::spec::base::apple::{mac_catalyst_llvm_target, opts, pre_link_args, Arch, TargetAbi};
1+
use crate::spec::base::apple::{mac_catalyst_llvm_target, opts, Arch, TargetAbi};
22
use crate::spec::{FramePointer, MaybeLazy, SanitizerSet, Target, TargetOptions};
33

44
pub fn target() -> Target {
55
const ARCH: Arch = Arch::Arm64;
66
const OS: &'static str = "ios";
77
const ABI: TargetAbi = TargetAbi::MacCatalyst;
88

9-
let mut base = opts(OS, ARCH, ABI, MaybeLazy::lazy(|| pre_link_args(OS, ARCH, ABI)));
9+
let mut base = opts(OS, ARCH, ABI);
1010
base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::LEAK | SanitizerSet::THREAD;
1111

1212
Target {

compiler/rustc_target/src/spec/targets/aarch64_apple_ios_sim.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
use crate::spec::base::apple::{ios_sim_llvm_target, opts, pre_link_args, Arch, TargetAbi};
1+
use crate::spec::base::apple::{ios_sim_llvm_target, opts, Arch, TargetAbi};
22
use crate::spec::{FramePointer, MaybeLazy, SanitizerSet, Target, TargetOptions};
33

44
pub fn target() -> Target {
55
const ARCH: Arch = Arch::Arm64;
66
const OS: &'static str = "ios";
77
const ABI: TargetAbi = TargetAbi::Simulator;
88

9-
let mut base = opts(OS, ARCH, ABI, MaybeLazy::lazy(|| pre_link_args(OS, ARCH, ABI)));
9+
let mut base = opts(OS, ARCH, ABI);
1010
base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::THREAD;
1111

1212
Target {

compiler/rustc_target/src/spec/targets/aarch64_apple_tvos.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::spec::base::apple::{opts, pre_link_args, tvos_llvm_target, Arch, TargetAbi};
1+
use crate::spec::base::apple::{opts, tvos_llvm_target, Arch, TargetAbi};
22
use crate::spec::{FramePointer, MaybeLazy, Target, TargetOptions};
33

44
pub fn target() -> Target {
@@ -21,7 +21,7 @@ pub fn target() -> Target {
2121
features: "+neon,+fp-armv8,+apple-a7".into(),
2222
max_atomic_width: Some(128),
2323
frame_pointer: FramePointer::NonLeaf,
24-
..opts(OS, ARCH, ABI, MaybeLazy::lazy(|| pre_link_args(OS, ARCH, ABI)))
24+
..opts(OS, ARCH, ABI)
2525
},
2626
}
2727
}

compiler/rustc_target/src/spec/targets/aarch64_apple_tvos_sim.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::spec::base::apple::{opts, pre_link_args, tvos_sim_llvm_target, Arch, TargetAbi};
1+
use crate::spec::base::apple::{opts, tvos_sim_llvm_target, Arch, TargetAbi};
22
use crate::spec::{FramePointer, MaybeLazy, Target, TargetOptions};
33

44
pub fn target() -> Target {
@@ -21,7 +21,7 @@ pub fn target() -> Target {
2121
features: "+neon,+fp-armv8,+apple-a7".into(),
2222
max_atomic_width: Some(128),
2323
frame_pointer: FramePointer::NonLeaf,
24-
..opts(OS, ARCH, ABI, MaybeLazy::lazy(|| pre_link_args(OS, ARCH, ABI)))
24+
..opts(OS, ARCH, ABI)
2525
},
2626
}
2727
}

compiler/rustc_target/src/spec/targets/aarch64_apple_visionos.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
use crate::spec::base::apple::{opts, pre_link_args, visionos_llvm_target, Arch, TargetAbi};
2-
use crate::spec::maybe_lazy::MaybeLazy;
3-
use crate::spec::{FramePointer, SanitizerSet, Target, TargetOptions};
1+
use crate::spec::base::apple::{opts, visionos_llvm_target, Arch, TargetAbi};
2+
use crate::spec::{FramePointer, MaybeLazy, SanitizerSet, Target, TargetOptions};
43

54
pub fn target() -> Target {
65
const OS: &str = "visionos";
76
const ABI: TargetAbi = TargetAbi::Normal;
87
const ARCH: Arch = Arch::Arm64;
98

10-
let mut base = opts(OS, ARCH, ABI, MaybeLazy::lazy(|| pre_link_args(OS, ARCH, ABI)));
9+
let mut base = opts(OS, ARCH, ABI);
1110
base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::THREAD;
1211

1312
Target {

compiler/rustc_target/src/spec/targets/aarch64_apple_visionos_sim.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
use crate::spec::base::apple::{opts, pre_link_args, visionos_sim_llvm_target, Arch, TargetAbi};
1+
use crate::spec::base::apple::{opts, visionos_sim_llvm_target, Arch, TargetAbi};
22
use crate::spec::{FramePointer, MaybeLazy, SanitizerSet, Target, TargetOptions};
33

44
pub fn target() -> Target {
55
const OS: &str = "visionos";
66
const ABI: TargetAbi = TargetAbi::Simulator;
77
const ARCH: Arch = Arch::Arm64;
88

9-
let mut base = opts(OS, ARCH, ABI, MaybeLazy::lazy(|| pre_link_args(OS, ARCH, ABI)));
9+
let mut base = opts(OS, ARCH, ABI);
1010
base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::THREAD;
1111

1212
Target {

compiler/rustc_target/src/spec/targets/aarch64_apple_watchos.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
use crate::spec::base::apple::{opts, pre_link_args, Arch, TargetAbi};
2-
use crate::spec::{MaybeLazy, Target, TargetOptions};
1+
use crate::spec::base::apple::{opts, Arch, TargetAbi};
2+
use crate::spec::{Target, TargetOptions};
33

44
pub fn target() -> Target {
55
const ARCH: Arch = Arch::Arm64;
66
const OS: &'static str = "watchos";
77
const ABI: TargetAbi = TargetAbi::Normal;
88

9-
let base = opts(OS, ARCH, ABI, MaybeLazy::lazy(|| pre_link_args(OS, ARCH, ABI)));
9+
let base = opts(OS, ARCH, ABI);
1010
Target {
1111
llvm_target: "aarch64-apple-watchos".into(),
1212
metadata: crate::spec::TargetMetadata {

compiler/rustc_target/src/spec/targets/aarch64_apple_watchos_sim.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::spec::base::apple::{opts, pre_link_args, watchos_sim_llvm_target, Arch, TargetAbi};
1+
use crate::spec::base::apple::{opts, watchos_sim_llvm_target, Arch, TargetAbi};
22
use crate::spec::{FramePointer, MaybeLazy, Target, TargetOptions};
33

44
pub fn target() -> Target {
@@ -25,7 +25,7 @@ pub fn target() -> Target {
2525
features: "+neon,+fp-armv8,+apple-a7".into(),
2626
max_atomic_width: Some(128),
2727
frame_pointer: FramePointer::NonLeaf,
28-
..opts(OS, ARCH, ABI, MaybeLazy::lazy(|| pre_link_args(OS, ARCH, ABI)))
28+
..opts(OS, ARCH, ABI)
2929
},
3030
}
3131
}

compiler/rustc_target/src/spec/targets/arm64_32_apple_watchos.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
use crate::spec::base::apple::{opts, pre_link_args, watchos_llvm_target, Arch, TargetAbi};
1+
use crate::spec::base::apple::{opts, watchos_llvm_target, Arch, TargetAbi};
22
use crate::spec::{MaybeLazy, Target, TargetOptions};
33

44
pub fn target() -> Target {
55
const OS: &str = "watchos";
66
const ARCH: Arch = Arch::Arm64_32;
77
const ABI: TargetAbi = TargetAbi::Normal;
88

9-
let base = opts(OS, ARCH, ABI, MaybeLazy::lazy(|| pre_link_args(OS, ARCH, ABI)));
9+
let base = opts(OS, ARCH, ABI);
1010

1111
Target {
1212
llvm_target: MaybeLazy::lazy(|| watchos_llvm_target(ARCH)),

compiler/rustc_target/src/spec/targets/arm64e_apple_darwin.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
use crate::spec::base::apple::{macos_llvm_target, opts, pre_link_args, Arch, TargetAbi};
1+
use crate::spec::base::apple::{macos_llvm_target, opts, Arch, TargetAbi};
22
use crate::spec::{FramePointer, MaybeLazy, SanitizerSet, Target, TargetOptions};
33

44
pub fn target() -> Target {
55
const ARCH: Arch = Arch::Arm64e;
66
const OS: &'static str = "macos";
77
const ABI: TargetAbi = TargetAbi::Normal;
88

9-
let mut base = opts(OS, ARCH, ABI, MaybeLazy::lazy(|| pre_link_args(OS, ARCH, ABI)));
9+
let mut base = opts(OS, ARCH, ABI);
1010
base.cpu = "apple-m1".into();
1111
base.max_atomic_width = Some(128);
1212

compiler/rustc_target/src/spec/targets/arm64e_apple_ios.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
use crate::spec::base::apple::{ios_llvm_target, opts, pre_link_args, Arch, TargetAbi};
1+
use crate::spec::base::apple::{ios_llvm_target, opts, Arch, TargetAbi};
22
use crate::spec::{FramePointer, MaybeLazy, SanitizerSet, Target, TargetOptions};
33

44
pub fn target() -> Target {
55
const ARCH: Arch = Arch::Arm64e;
66
const OS: &'static str = "ios";
77
const ABI: TargetAbi = TargetAbi::Normal;
88

9-
let mut base = opts(OS, ARCH, ABI, MaybeLazy::lazy(|| pre_link_args(OS, ARCH, ABI)));
9+
let mut base = opts(OS, ARCH, ABI);
1010
base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::THREAD;
1111

1212
Target {

compiler/rustc_target/src/spec/targets/armv7k_apple_watchos.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use crate::spec::base::apple::{opts, pre_link_args, Arch, TargetAbi};
2-
use crate::spec::{MaybeLazy, Target, TargetOptions};
1+
use crate::spec::base::apple::{opts, Arch, TargetAbi};
2+
use crate::spec::{Target, TargetOptions};
33

44
pub fn target() -> Target {
55
const ARCH: Arch = Arch::Armv7k;
@@ -22,7 +22,7 @@ pub fn target() -> Target {
2222
max_atomic_width: Some(64),
2323
dynamic_linking: false,
2424
position_independent_executables: true,
25-
..opts(OS, ARCH, ABI, MaybeLazy::lazy(|| pre_link_args(OS, ARCH, ABI)))
25+
..opts(OS, ARCH, ABI)
2626
},
2727
}
2828
}

compiler/rustc_target/src/spec/targets/armv7s_apple_ios.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::spec::base::apple::{ios_llvm_target, opts, pre_link_args, Arch, TargetAbi};
1+
use crate::spec::base::apple::{ios_llvm_target, opts, Arch, TargetAbi};
22
use crate::spec::{MaybeLazy, Target, TargetOptions};
33

44
pub fn target() -> Target {
@@ -20,7 +20,7 @@ pub fn target() -> Target {
2020
options: TargetOptions {
2121
features: "+v7,+vfp4,+neon".into(),
2222
max_atomic_width: Some(64),
23-
..opts(OS, ARCH, ABI, MaybeLazy::lazy(|| pre_link_args(OS, ARCH, ABI)))
23+
..opts(OS, ARCH, ABI)
2424
},
2525
}
2626
}

compiler/rustc_target/src/spec/targets/i386_apple_ios.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::spec::base::apple::{ios_sim_llvm_target, opts, pre_link_args, Arch, TargetAbi};
1+
use crate::spec::base::apple::{ios_sim_llvm_target, opts, Arch, TargetAbi};
22
use crate::spec::{MaybeLazy, Target, TargetOptions};
33

44
pub fn target() -> Target {
@@ -25,9 +25,6 @@ pub fn target() -> Target {
2525
i128:128-f64:32:64-f80:128-n8:16:32-S128"
2626
.into(),
2727
arch: ARCH.target_arch(),
28-
options: TargetOptions {
29-
max_atomic_width: Some(64),
30-
..opts(OS, ARCH, ABI, MaybeLazy::lazy(|| pre_link_args(OS, ARCH, ABI)))
31-
},
28+
options: TargetOptions { max_atomic_width: Some(64), ..opts(OS, ARCH, ABI) },
3229
}
3330
}

compiler/rustc_target/src/spec/targets/i686_apple_darwin.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::spec::base::apple::{macos_llvm_target, opts, pre_link_args, Arch, TargetAbi};
1+
use crate::spec::base::apple::{macos_llvm_target, opts, Arch, TargetAbi};
22
use crate::spec::{Cc, FramePointer, LinkerFlavor, Lld, MaybeLazy, Target, TargetOptions};
33

44
pub fn target() -> Target {
@@ -7,7 +7,7 @@ pub fn target() -> Target {
77
const OS: &'static str = "macos";
88
const ABI: TargetAbi = TargetAbi::Normal;
99

10-
let mut base = opts(OS, ARCH, ABI, MaybeLazy::lazy(|| pre_link_args(OS, ARCH, ABI)));
10+
let mut base = opts(OS, ARCH, ABI);
1111
base.max_atomic_width = Some(64);
1212
base.pre_link_args =
1313
TargetOptions::link_args(LinkerFlavor::Darwin(Cc::Yes, Lld::No), &["-m32"]);

compiler/rustc_target/src/spec/targets/x86_64_apple_darwin.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::spec::base::apple::{macos_llvm_target, opts, pre_link_args, Arch, TargetAbi};
1+
use crate::spec::base::apple::{macos_llvm_target, opts, Arch, TargetAbi};
22
use crate::spec::{Cc, FramePointer, LinkerFlavor, Lld, MaybeLazy, SanitizerSet};
33
use crate::spec::{Target, TargetOptions};
44

@@ -7,7 +7,7 @@ pub fn target() -> Target {
77
const OS: &'static str = "macos";
88
const ABI: TargetAbi = TargetAbi::Normal;
99

10-
let mut base = opts(OS, ARCH, ABI, MaybeLazy::lazy(|| pre_link_args(OS, ARCH, ABI)));
10+
let mut base = opts(OS, ARCH, ABI);
1111
base.max_atomic_width = Some(128); // penryn+ supports cmpxchg16b
1212
base.frame_pointer = FramePointer::Always;
1313
base.pre_link_args =

compiler/rustc_target/src/spec/targets/x86_64_apple_ios.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::spec::base::apple::{ios_sim_llvm_target, opts, pre_link_args, Arch, TargetAbi};
1+
use crate::spec::base::apple::{ios_sim_llvm_target, opts, Arch, TargetAbi};
22
use crate::spec::{MaybeLazy, SanitizerSet, Target, TargetOptions};
33

44
pub fn target() -> Target {
@@ -8,7 +8,7 @@ pub fn target() -> Target {
88

99
// x86_64-apple-ios is a simulator target, even though it isn't declared
1010
// that way in the target name like the other ones...
11-
let mut base = opts(OS, ARCH, ABI, MaybeLazy::lazy(|| pre_link_args(OS, ARCH, ABI)));
11+
let mut base = opts(OS, ARCH, ABI);
1212
base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::THREAD;
1313

1414
Target {

compiler/rustc_target/src/spec/targets/x86_64_apple_ios_macabi.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
use crate::spec::base::apple::{mac_catalyst_llvm_target, opts, pre_link_args, Arch, TargetAbi};
1+
use crate::spec::base::apple::{mac_catalyst_llvm_target, opts, Arch, TargetAbi};
22
use crate::spec::{MaybeLazy, SanitizerSet, Target, TargetOptions};
33

44
pub fn target() -> Target {
55
const ARCH: Arch = Arch::X86_64;
66
const OS: &'static str = "ios";
77
const ABI: TargetAbi = TargetAbi::MacCatalyst;
88

9-
let mut base = opts(OS, ARCH, ABI, MaybeLazy::lazy(|| pre_link_args(OS, ARCH, ABI)));
9+
let mut base = opts(OS, ARCH, ABI);
1010
base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::LEAK | SanitizerSet::THREAD;
1111

1212
Target {

compiler/rustc_target/src/spec/targets/x86_64_apple_tvos.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::spec::base::apple::{opts, pre_link_args, tvos_sim_llvm_target, Arch, TargetAbi};
1+
use crate::spec::base::apple::{opts, tvos_sim_llvm_target, Arch, TargetAbi};
22
use crate::spec::{MaybeLazy, Target, TargetOptions};
33

44
pub fn target() -> Target {
@@ -21,9 +21,6 @@ pub fn target() -> Target {
2121
data_layout:
2222
"e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(),
2323
arch: ARCH.target_arch(),
24-
options: TargetOptions {
25-
max_atomic_width: Some(128),
26-
..opts(OS, ARCH, ABI, MaybeLazy::lazy(|| pre_link_args(OS, ARCH, ABI)))
27-
},
24+
options: TargetOptions { max_atomic_width: Some(128), ..opts(OS, ARCH, ABI) },
2825
}
2926
}

0 commit comments

Comments
 (0)