Skip to content

Commit 42ca6e4

Browse files
committed
Auto merge of #104385 - BlackHoleFox:apple-minimum-bumps, r=petrochenkov
Raise minimum supported Apple OS versions This implements the proposal to raise the minimum supported Apple OS versions as laid out in the now-completed MCP (rust-lang/compiler-team#556). As of this PR, rustc and the stdlib now support these versions as the baseline: - macOS: 10.12 Sierra - iOS: 10 - tvOS: 10 - watchOS: 5 (Unchanged) In addition to everything this breaks indirectly, these changes also erase the `armv7-apple-ios` target (currently tier 3) because the oldest supported iOS device now uses ARMv7s. Not sure what the policy around tier3 target removal is but shimming it is not an option due to the linker refusing. [Per comment](rust-lang/compiler-team#556 (comment)), this requires a FCP to merge. cc `@wesleywiser.`
2 parents 0f2a9ce + 2044a2d commit 42ca6e4

File tree

18 files changed

+49
-93
lines changed

18 files changed

+49
-93
lines changed

.github/workflows/ci.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ jobs:
305305
SCRIPT: "./x.py dist bootstrap --include-default-paths --host=x86_64-apple-darwin --target=x86_64-apple-darwin"
306306
RUST_CONFIGURE_ARGS: "--enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false --set rust.lto=thin"
307307
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
308-
MACOSX_DEPLOYMENT_TARGET: 10.7
308+
MACOSX_DEPLOYMENT_TARGET: 10.12
309309
SELECT_XCODE: /Applications/Xcode_13.4.1.app
310310
NO_LLVM_ASSERTIONS: 1
311311
NO_DEBUG_ASSERTIONS: 1
@@ -317,7 +317,7 @@ jobs:
317317
SCRIPT: "./x.py dist bootstrap --include-default-paths --host='' --target=aarch64-apple-ios,x86_64-apple-ios,aarch64-apple-ios-sim"
318318
RUST_CONFIGURE_ARGS: "--enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
319319
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
320-
MACOSX_DEPLOYMENT_TARGET: 10.7
320+
MACOSX_DEPLOYMENT_TARGET: 10.12
321321
SELECT_XCODE: /Applications/Xcode_13.4.1.app
322322
NO_LLVM_ASSERTIONS: 1
323323
NO_DEBUG_ASSERTIONS: 1
@@ -328,8 +328,8 @@ jobs:
328328
SCRIPT: "./x.py --stage 2 test --skip tests/ui --skip tests/rustdoc --skip tests/run-make-fulldeps"
329329
RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
330330
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
331-
MACOSX_DEPLOYMENT_TARGET: 10.8
332-
MACOSX_STD_DEPLOYMENT_TARGET: 10.7
331+
MACOSX_DEPLOYMENT_TARGET: 10.12
332+
MACOSX_STD_DEPLOYMENT_TARGET: 10.12
333333
NO_LLVM_ASSERTIONS: 1
334334
NO_DEBUG_ASSERTIONS: 1
335335
NO_OVERFLOW_CHECKS: 1
@@ -339,8 +339,8 @@ jobs:
339339
SCRIPT: "./x.py --stage 2 test tests/ui tests/rustdoc tests/run-make-fulldeps"
340340
RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
341341
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
342-
MACOSX_DEPLOYMENT_TARGET: 10.8
343-
MACOSX_STD_DEPLOYMENT_TARGET: 10.7
342+
MACOSX_DEPLOYMENT_TARGET: 10.12
343+
MACOSX_STD_DEPLOYMENT_TARGET: 10.12
344344
NO_LLVM_ASSERTIONS: 1
345345
NO_DEBUG_ASSERTIONS: 1
346346
NO_OVERFLOW_CHECKS: 1

compiler/rustc_target/src/spec/apple_base.rs

+22-34
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use Arch::*;
1111
#[allow(non_camel_case_types)]
1212
#[derive(Copy, Clone)]
1313
pub enum Arch {
14-
Armv7,
1514
Armv7k,
1615
Armv7s,
1716
Arm64,
@@ -29,7 +28,6 @@ pub enum Arch {
2928
impl Arch {
3029
pub fn target_name(self) -> &'static str {
3130
match self {
32-
Armv7 => "armv7",
3331
Armv7k => "armv7k",
3432
Armv7s => "armv7s",
3533
Arm64 | Arm64_macabi | Arm64_sim => "arm64",
@@ -43,7 +41,7 @@ impl Arch {
4341

4442
pub fn target_arch(self) -> Cow<'static, str> {
4543
Cow::Borrowed(match self {
46-
Armv7 | Armv7k | Armv7s => "arm",
44+
Armv7k | Armv7s => "arm",
4745
Arm64 | Arm64_32 | Arm64_macabi | Arm64_sim => "aarch64",
4846
I386 | I686 => "x86",
4947
X86_64 | X86_64_sim | X86_64_macabi | X86_64h => "x86_64",
@@ -52,7 +50,7 @@ impl Arch {
5250

5351
fn target_abi(self) -> &'static str {
5452
match self {
55-
Armv7 | Armv7k | Armv7s | Arm64 | Arm64_32 | I386 | I686 | X86_64 | X86_64h => "",
53+
Armv7k | Armv7s | Arm64 | Arm64_32 | I386 | I686 | X86_64 | X86_64h => "",
5654
X86_64_macabi | Arm64_macabi => "macabi",
5755
// x86_64-apple-ios is a simulator target, even though it isn't
5856
// declared that way in the target like the other ones...
@@ -62,18 +60,20 @@ impl Arch {
6260

6361
fn target_cpu(self) -> &'static str {
6462
match self {
65-
Armv7 => "cortex-a8", // iOS7 is supported on iPhone 4 and higher
6663
Armv7k => "cortex-a8",
67-
Armv7s => "cortex-a9",
64+
Armv7s => "swift", // iOS 10 is only supported on iPhone 5 or higher.
6865
Arm64 => "apple-a7",
6966
Arm64_32 => "apple-s4",
70-
I386 | I686 => "yonah",
71-
X86_64 | X86_64_sim => "core2",
67+
// Only macOS 10.12+ is supported, which means
68+
// all x86_64/x86 CPUs must be running at least penryn
69+
// https://github.com/llvm/llvm-project/blob/01f924d0e37a5deae51df0d77e10a15b63aa0c0f/clang/lib/Driver/ToolChains/Arch/X86.cpp#L79-L82
70+
I386 | I686 => "penryn",
71+
X86_64 | X86_64_sim => "penryn",
72+
X86_64_macabi => "penryn",
7273
// Note: `core-avx2` is slightly more advanced than `x86_64h`, see
7374
// comments (and disabled features) in `x86_64h_apple_darwin` for
74-
// details.
75+
// details. It is a higher baseline then `penryn` however.
7576
X86_64h => "core-avx2",
76-
X86_64_macabi => "core2",
7777
Arm64_macabi => "apple-a12",
7878
Arm64_sim => "apple-a12",
7979
}
@@ -115,21 +115,6 @@ fn pre_link_args(os: &'static str, arch: Arch, abi: &'static str) -> LinkArgs {
115115
}
116116

117117
pub fn opts(os: &'static str, arch: Arch) -> TargetOptions {
118-
// Static TLS is only available in macOS 10.7+. If you try to compile for 10.6
119-
// either the linker will complain if it is used or the binary will end up
120-
// segfaulting at runtime when run on 10.6. Rust by default supports macOS
121-
// 10.7+, but there is a standard environment variable,
122-
// MACOSX_DEPLOYMENT_TARGET, which is used to signal targeting older
123-
// versions of macOS. For example compiling on 10.10 with
124-
// MACOSX_DEPLOYMENT_TARGET set to 10.6 will cause the linker to generate
125-
// warnings about the usage of static TLS.
126-
//
127-
// Here we detect what version is being requested, defaulting to 10.7. Static
128-
// TLS is flagged as enabled if it looks to be supported. The architecture
129-
// only matters for default deployment target which is 11.0 for ARM64 and
130-
// 10.7 for everything else.
131-
let has_thread_local = os == "macos" && macos_deployment_target(Arch::X86_64) >= (10, 7);
132-
133118
let abi = arch.target_abi();
134119

135120
TargetOptions {
@@ -145,12 +130,17 @@ pub fn opts(os: &'static str, arch: Arch) -> TargetOptions {
145130
pre_link_args: pre_link_args(os, arch, abi),
146131
families: cvs!["unix"],
147132
is_like_osx: true,
148-
default_dwarf_version: 2,
133+
// LLVM notes that macOS 10.11+ and iOS 9+ default
134+
// to v4, so we do the same.
135+
// https://github.com/llvm/llvm-project/blob/378778a0d10c2f8d5df8ceff81f95b6002984a4b/clang/lib/Driver/ToolChains/Darwin.cpp#L1203
136+
default_dwarf_version: 4,
149137
frame_pointer: FramePointer::Always,
150138
has_rpath: true,
151139
dll_suffix: ".dylib".into(),
152140
archive_format: "darwin".into(),
153-
has_thread_local,
141+
// Thread locals became available with iOS 8 and macOS 10.7,
142+
// and both are far below our minimum.
143+
has_thread_local: true,
154144
abi_return_struct_as_int: true,
155145
emit_debug_gdb_scripts: false,
156146
eh_frame_header: false,
@@ -239,9 +229,7 @@ fn macos_default_deployment_target(arch: Arch) -> (u32, u32) {
239229
match arch {
240230
// Note: Arm64_sim is not included since macOS has no simulator.
241231
Arm64 | Arm64_macabi => (11, 0),
242-
// x86_64h-apple-darwin only supports macOS 10.8 and later
243-
X86_64h => (10, 8),
244-
_ => (10, 7),
232+
_ => (10, 12),
245233
}
246234
}
247235

@@ -292,8 +280,8 @@ fn link_env_remove(arch: Arch, os: &'static str) -> StaticCow<[StaticCow<str>]>
292280
// Otherwise if cross-compiling for a different OS/SDK, remove any part
293281
// of the linking environment that's wrong and reversed.
294282
match arch {
295-
Armv7 | Armv7k | Armv7s | Arm64 | Arm64_32 | I386 | I686 | X86_64 | X86_64_sim
296-
| X86_64h | Arm64_sim => {
283+
Armv7k | Armv7s | Arm64 | Arm64_32 | I386 | I686 | X86_64 | X86_64_sim | X86_64h
284+
| Arm64_sim => {
297285
cvs!["MACOSX_DEPLOYMENT_TARGET"]
298286
}
299287
X86_64_macabi | Arm64_macabi => cvs!["IPHONEOS_DEPLOYMENT_TARGET"],
@@ -303,7 +291,7 @@ fn link_env_remove(arch: Arch, os: &'static str) -> StaticCow<[StaticCow<str>]>
303291

304292
fn ios_deployment_target() -> (u32, u32) {
305293
// If you are looking for the default deployment target, prefer `rustc --print deployment-target`.
306-
from_set_deployment_target("IPHONEOS_DEPLOYMENT_TARGET").unwrap_or((7, 0))
294+
from_set_deployment_target("IPHONEOS_DEPLOYMENT_TARGET").unwrap_or((10, 0))
307295
}
308296

309297
fn mac_catalyst_deployment_target() -> (u32, u32) {
@@ -334,7 +322,7 @@ pub fn ios_sim_llvm_target(arch: Arch) -> String {
334322

335323
fn tvos_deployment_target() -> (u32, u32) {
336324
// If you are looking for the default deployment target, prefer `rustc --print deployment-target`.
337-
from_set_deployment_target("TVOS_DEPLOYMENT_TARGET").unwrap_or((7, 0))
325+
from_set_deployment_target("TVOS_DEPLOYMENT_TARGET").unwrap_or((10, 0))
338326
}
339327

340328
fn tvos_lld_platform_version() -> String {

compiler/rustc_target/src/spec/armv7_apple_ios.rs

-21
This file was deleted.

compiler/rustc_target/src/spec/armv7s_apple_ios.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
use super::apple_base::{opts, Arch};
1+
use super::apple_base::{ios_llvm_target, opts, Arch};
22
use crate::spec::{Target, TargetOptions};
33

44
pub fn target() -> Target {
55
let arch = Arch::Armv7s;
66
Target {
7-
llvm_target: "armv7s-apple-ios".into(),
7+
llvm_target: ios_llvm_target(arch).into(),
88
pointer_width: 32,
99
data_layout: "e-m:o-p:32:32-Fi8-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32".into(),
1010
arch: arch.target_arch(),

compiler/rustc_target/src/spec/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1394,7 +1394,6 @@ supported_targets! {
13941394
("i386-apple-ios", i386_apple_ios),
13951395
("x86_64-apple-ios", x86_64_apple_ios),
13961396
("aarch64-apple-ios", aarch64_apple_ios),
1397-
("armv7-apple-ios", armv7_apple_ios),
13981397
("armv7s-apple-ios", armv7s_apple_ios),
13991398
("x86_64-apple-ios-macabi", x86_64_apple_ios_macabi),
14001399
("aarch64-apple-ios-macabi", aarch64_apple_ios_macabi),

compiler/rustc_target/src/spec/x86_64_apple_darwin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::spec::{StackProbeType, Target, TargetOptions};
55
pub fn target() -> Target {
66
let arch = Arch::X86_64;
77
let mut base = opts("macos", arch);
8-
base.max_atomic_width = Some(128); // core2 supports cmpxchg16b
8+
base.max_atomic_width = Some(128); // penryn+ supports cmpxchg16b
99
base.frame_pointer = FramePointer::Always;
1010
base.add_pre_link_args(LinkerFlavor::Darwin(Cc::Yes, Lld::No), &["-m64"]);
1111
base.stack_probes = StackProbeType::X86;

library/std/src/sys/unix/thread_local_dtor.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern "C" fn(*mut u8)) {
4848
// workaround below is to register, via _tlv_atexit, a custom DTOR list once per
4949
// thread. thread_local dtors are pushed to the DTOR list without calling
5050
// _tlv_atexit.
51-
#[cfg(target_os = "macos")]
51+
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "watchos"))]
5252
pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern "C" fn(*mut u8)) {
5353
use crate::cell::Cell;
5454
use crate::mem;

library/std/src/sys/unix/thread_parking/darwin.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
//!
33
//! Darwin actually has futex syscalls (`__ulock_wait`/`__ulock_wake`), but they
44
//! cannot be used in `std` because they are non-public (their use will lead to
5-
//! rejection from the App Store) and because they are only available starting
6-
//! with macOS version 10.12, even though the minimum target version is 10.7.
5+
//! rejection from the App Store).
76
//!
87
//! Therefore, we need to look for other synchronization primitives. Luckily, Darwin
98
//! supports semaphores, which allow us to implement the behaviour we need with

src/bootstrap/llvm.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -703,14 +703,7 @@ fn configure_cmake(
703703
cflags.push(" ");
704704
cflags.push(s);
705705
}
706-
// Some compiler features used by LLVM (such as thread locals) will not work on a min version below iOS 10.
707-
if target.contains("apple-ios") {
708-
if target.contains("86-") {
709-
cflags.push(" -miphonesimulator-version-min=10.0");
710-
} else {
711-
cflags.push(" -miphoneos-version-min=10.0");
712-
}
713-
}
706+
714707
if builder.config.llvm_clang_cl.is_some() {
715708
cflags.push(&format!(" --target={target}"));
716709
}

src/ci/github-actions/ci.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ jobs:
484484
SCRIPT: ./x.py dist bootstrap --include-default-paths --host=x86_64-apple-darwin --target=x86_64-apple-darwin
485485
RUST_CONFIGURE_ARGS: --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false --set rust.lto=thin
486486
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
487-
MACOSX_DEPLOYMENT_TARGET: 10.7
487+
MACOSX_DEPLOYMENT_TARGET: 10.12
488488
SELECT_XCODE: /Applications/Xcode_13.4.1.app
489489
NO_LLVM_ASSERTIONS: 1
490490
NO_DEBUG_ASSERTIONS: 1
@@ -497,7 +497,7 @@ jobs:
497497
SCRIPT: ./x.py dist bootstrap --include-default-paths --host='' --target=aarch64-apple-ios,x86_64-apple-ios,aarch64-apple-ios-sim
498498
RUST_CONFIGURE_ARGS: --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false
499499
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
500-
MACOSX_DEPLOYMENT_TARGET: 10.7
500+
MACOSX_DEPLOYMENT_TARGET: 10.12
501501
SELECT_XCODE: /Applications/Xcode_13.4.1.app
502502
NO_LLVM_ASSERTIONS: 1
503503
NO_DEBUG_ASSERTIONS: 1
@@ -509,8 +509,8 @@ jobs:
509509
SCRIPT: ./x.py --stage 2 test --skip tests/ui --skip tests/rustdoc --skip tests/run-make-fulldeps
510510
RUST_CONFIGURE_ARGS: --build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false
511511
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
512-
MACOSX_DEPLOYMENT_TARGET: 10.8
513-
MACOSX_STD_DEPLOYMENT_TARGET: 10.7
512+
MACOSX_DEPLOYMENT_TARGET: 10.12
513+
MACOSX_STD_DEPLOYMENT_TARGET: 10.12
514514
NO_LLVM_ASSERTIONS: 1
515515
NO_DEBUG_ASSERTIONS: 1
516516
NO_OVERFLOW_CHECKS: 1

src/doc/rustc/src/platform-support.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ target | notes
3636
`i686-pc-windows-gnu` | 32-bit MinGW (Windows 7+) [^windows-support]
3737
`i686-pc-windows-msvc` | 32-bit MSVC (Windows 7+) [^windows-support]
3838
`i686-unknown-linux-gnu` | 32-bit Linux (kernel 3.2+, glibc 2.17+)
39-
`x86_64-apple-darwin` | 64-bit macOS (10.7+, Lion+)
39+
`x86_64-apple-darwin` | 64-bit macOS (10.12+, Sierra+)
4040
`x86_64-pc-windows-gnu` | 64-bit MinGW (Windows 7+) [^windows-support]
4141
`x86_64-pc-windows-msvc` | 64-bit MSVC (Windows 7+) [^windows-support]
4242
`x86_64-unknown-linux-gnu` | 64-bit Linux (kernel 3.2+, glibc 2.17+)
@@ -245,7 +245,6 @@ target | std | host | notes
245245
`armv6-unknown-freebsd` | ✓ | ✓ | ARMv6 FreeBSD
246246
[`armv6-unknown-netbsd-eabihf`](platform-support/netbsd.md) | ✓ | ✓ | ARMv6 NetBSD w/hard-float
247247
[`armv6k-nintendo-3ds`](platform-support/armv6k-nintendo-3ds.md) | ? | | ARMv6K Nintendo 3DS, Horizon (Requires devkitARM toolchain)
248-
`armv7-apple-ios` | ✓ | | ARMv7-A Cortex-A8 iOS
249248
[`armv7-sony-vita-newlibeabihf`](platform-support/armv7-sony-vita-newlibeabihf.md) | ? | | ARMv7-A Cortex-A9 Sony PlayStation Vita (requires VITASDK toolchain)
250249
[`armv7-unknown-linux-ohos`](platform-support/openharmony.md) | ✓ | | ARMv7-A OpenHarmony |
251250
[`armv7-unknown-linux-uclibceabi`](platform-support/armv7-unknown-linux-uclibceabi.md) | ✓ | ✓ | ARMv7-A Linux with uClibc, softfloat
@@ -265,7 +264,7 @@ target | std | host | notes
265264
`hexagon-unknown-linux-musl` | ? | |
266265
`i386-apple-ios` | ✓ | | 32-bit x86 iOS
267266
[`i586-pc-nto-qnx700`](platform-support/nto-qnx.md) | * | | 32-bit x86 QNX Neutrino 7.0 RTOS |
268-
`i686-apple-darwin` | ✓ | ✓ | 32-bit macOS (10.7+, Lion+)
267+
`i686-apple-darwin` | ✓ | ✓ | 32-bit macOS (10.12+, Sierra+)
269268
`i686-pc-windows-msvc` | * | | 32-bit Windows XP support
270269
[`i686-pc-windows-gnullvm`](platform-support/pc-windows-gnullvm.md) | ✓ | ✓ |
271270
`i686-unknown-haiku` | ✓ | ✓ | 32-bit Haiku

src/etc/installer/pkg/Distribution.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<domains enable_anywhere="false" enable_currentUserHome="false" enable_localSystem="true" />
88
<volume-check>
99
<allowed-os-versions>
10-
<os-version min="10.7"/>
10+
<os-version min="10.12"/>
1111
</allowed-os-versions>
1212
</volume-check>
1313
<choices-outline>

src/tools/build-manifest/src/main.rs

-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ static TARGETS: &[&str] = &[
6969
"arm-unknown-linux-musleabihf",
7070
"armv5te-unknown-linux-gnueabi",
7171
"armv5te-unknown-linux-musleabi",
72-
"armv7-apple-ios",
7372
"armv7-linux-androideabi",
7473
"thumbv7neon-linux-androideabi",
7574
"armv7-unknown-linux-gnueabi",

tests/codegen/macos/i686-macosx-deployment-target.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
// compile-flags: -O --target=i686-apple-darwin --crate-type=rlib
66
// needs-llvm-components: x86
7-
// rustc-env:MACOSX_DEPLOYMENT_TARGET=10.9
7+
// rustc-env:MACOSX_DEPLOYMENT_TARGET=10.14
88
#![feature(no_core, lang_items)]
99
#![no_core]
1010

@@ -20,7 +20,7 @@ pub struct Bool {
2020
b: bool,
2121
}
2222

23-
// CHECK: target triple = "i686-apple-macosx10.9.0"
23+
// CHECK: target triple = "i686-apple-macosx10.14.0"
2424
#[no_mangle]
2525
pub extern "C" fn structbool() -> Bool {
2626
Bool { b: true }

tests/codegen/macos/i686-no-macosx-deployment-target.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub struct Bool {
2020
b: bool,
2121
}
2222

23-
// CHECK: target triple = "i686-apple-macosx10.7.0"
23+
// CHECK: target triple = "i686-apple-macosx10.12.0"
2424
#[no_mangle]
2525
pub extern "C" fn structbool() -> Bool {
2626
Bool { b: true }

tests/codegen/macos/x86_64-macosx-deployment-target.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
// compile-flags: -O --target=x86_64-apple-darwin --crate-type=rlib
66
// needs-llvm-components: x86
7-
// rustc-env:MACOSX_DEPLOYMENT_TARGET=10.9
7+
// rustc-env:MACOSX_DEPLOYMENT_TARGET=10.14
88
#![feature(no_core, lang_items)]
99
#![no_core]
1010

@@ -20,7 +20,7 @@ pub struct Bool {
2020
b: bool,
2121
}
2222

23-
// CHECK: target triple = "x86_64-apple-macosx10.9.0"
23+
// CHECK: target triple = "x86_64-apple-macosx10.14.0"
2424
#[no_mangle]
2525
pub extern "C" fn structbool() -> Bool {
2626
Bool { b: true }

tests/codegen/macos/x86_64-no-macosx-deployment-target.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub struct Bool {
2020
b: bool,
2121
}
2222

23-
// CHECK: target triple = "x86_64-apple-macosx10.7.0"
23+
// CHECK: target triple = "x86_64-apple-macosx10.12.0"
2424
#[no_mangle]
2525
pub extern "C" fn structbool() -> Bool {
2626
Bool { b: true }

0 commit comments

Comments
 (0)