summary refs log tree commit diff
path: root/tests/codegen-llvm/macos/i686-macosx-deployment-target.rs
blob: cfa91e61cb00e2d60941da879966a4f9b846e5e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Checks that we correctly modify the target when MACOSX_DEPLOYMENT_TARGET is set.
// See issue #60235.

//@ add-core-stubs
//@ compile-flags: -Copt-level=3 --target=i686-apple-darwin --crate-type=rlib
//@ needs-llvm-components: x86
//@ rustc-env:MACOSX_DEPLOYMENT_TARGET=10.14
#![feature(no_core, lang_items)]
#![no_core]

extern crate minicore;
use minicore::*;

#[repr(C)]
pub struct Bool {
    b: bool,
}

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