Auto merge of #48896 - alexcrichton:bitcode-in-object, r=michaelwoerister

rustc: Enable embedding LLVM bitcode for iOS

This commit updates rustc to embed bitcode in each object file generated by
default when compiling for iOS. This was determined in #35968 as a step
towards better compatibility with the iOS toolchain, so let's give it a spin and
see how it turns out!

Note that this also updates the `cc` dependency which should propagate this
change of embedding bitcode for C dependencies as well.
This commit is contained in:
bors
2018-03-16 13:48:20 +00:00
5 changed files with 89 additions and 4 deletions

View File

@@ -86,6 +86,7 @@ fn main() {
fn build_libbacktrace(host: &str, target: &str) -> Result<(), ()> {
let native = native_lib_boilerplate("libbacktrace", "libbacktrace", "backtrace", ".libs")?;
let cflags = env::var("CFLAGS").unwrap_or_default() + " -fvisibility=hidden -O2";
run(Command::new("sh")
.current_dir(&native.out_dir)
@@ -98,7 +99,7 @@ fn build_libbacktrace(host: &str, target: &str) -> Result<(), ()> {
.arg("--disable-host-shared")
.arg(format!("--host={}", build_helper::gnu_target(target)))
.arg(format!("--build={}", build_helper::gnu_target(host)))
.env("CFLAGS", env::var("CFLAGS").unwrap_or_default() + " -fvisibility=hidden"));
.env("CFLAGS", cflags));
run(Command::new(build_helper::make(host))
.current_dir(&native.out_dir)