-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
choose a more specific LLVM target on OS X when necessary
This behavior matches clang's behavior, and makes cross-language LTO possible. Fixes #60235.
- Loading branch information
Showing
6 changed files
with
94 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// 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 | ||
// 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 } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// Checks that we correctly modify the target when MACOSX_DEPLOYMENT_TARGET is set. | ||
// See issue #60235. | ||
|
||
// compile-flags: -O --target=x86_64-apple-darwin --crate-type=rlib | ||
// 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 = "x86_64-apple-macosx10.9.0" | ||
#[no_mangle] | ||
pub extern "C" fn structbool() -> Bool { | ||
Bool { b: true } | ||
} |