]> git.proxmox.com Git - rustc.git/blob - tests/codegen/i686-macosx-deployment-target.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / codegen / i686-macosx-deployment-target.rs
1 //
2 // Checks that we correctly modify the target when MACOSX_DEPLOYMENT_TARGET is set.
3 // See issue #60235.
4
5 // compile-flags: -O --target=i686-apple-darwin --crate-type=rlib
6 // needs-llvm-components: x86
7 // rustc-env:MACOSX_DEPLOYMENT_TARGET=10.9
8 #![feature(no_core, lang_items)]
9 #![no_core]
10
11 #[lang="sized"]
12 trait Sized { }
13 #[lang="freeze"]
14 trait Freeze { }
15 #[lang="copy"]
16 trait Copy { }
17
18 #[repr(C)]
19 pub struct Bool {
20 b: bool,
21 }
22
23 // CHECK: target triple = "i686-apple-macosx10.9.0"
24 #[no_mangle]
25 pub extern "C" fn structbool() -> Bool {
26 Bool { b: true }
27 }