]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/i686-macosx-deployment-target.rs
Rollup merge of #69800 - tmiasko:address-g, r=nikic
[rust.git] / src / test / 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 // rustc-env:MACOSX_DEPLOYMENT_TARGET=10.9
7 #![feature(no_core, lang_items)]
8 #![no_core]
9
10 #[lang="sized"]
11 trait Sized { }
12 #[lang="freeze"]
13 trait Freeze { }
14 #[lang="copy"]
15 trait Copy { }
16
17 #[repr(C)]
18 pub struct Bool {
19     b: bool,
20 }
21
22 // CHECK: target triple = "i686-apple-macosx10.9.0"
23 #[no_mangle]
24 pub extern "C" fn structbool() -> Bool {
25     Bool { b: true }
26 }