From a4b7ed7a42c716ab9f05e351f003d589124fd55d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:58 +0200 Subject: Adding upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/codegen/i686-macosx-deployment-target.rs | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/codegen/i686-macosx-deployment-target.rs (limited to 'tests/codegen/i686-macosx-deployment-target.rs') diff --git a/tests/codegen/i686-macosx-deployment-target.rs b/tests/codegen/i686-macosx-deployment-target.rs new file mode 100644 index 000000000..17258a264 --- /dev/null +++ b/tests/codegen/i686-macosx-deployment-target.rs @@ -0,0 +1,27 @@ +// +// Checks that we correctly modify the target when MACOSX_DEPLOYMENT_TARGET is set. +// See issue #60235. + +// compile-flags: -O --target=i686-apple-darwin --crate-type=rlib +// needs-llvm-components: x86 +// rustc-env:MACOSX_DEPLOYMENT_TARGET=10.9 +#![feature(no_core, lang_items)] +#![no_core] + +#[lang="sized"] +trait Sized { } +#[lang="freeze"] +trait Freeze { } +#[lang="copy"] +trait Copy { } + +#[repr(C)] +pub struct Bool { + b: bool, +} + +// CHECK: target triple = "i686-apple-macosx10.9.0" +#[no_mangle] +pub extern "C" fn structbool() -> Bool { + Bool { b: true } +} -- cgit v1.2.3