about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2018-03-09 07:25:54 -0800
committerAlex Crichton <alex@alexcrichton.com>2018-03-13 08:29:19 -0700
commit0e0f74bcf93341ff3b1d8b59f3639416a159a140 (patch)
tree119a2c795c2cb96c87cf74771ec9b50949573086 /src/libstd
parent1999a3fb4154961329ecfff7d70a6303471b996a (diff)
downloadrust-0e0f74bcf93341ff3b1d8b59f3639416a159a140.tar.gz
rust-0e0f74bcf93341ff3b1d8b59f3639416a159a140.zip
rustc: Embed LLVM bitcode by default on 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.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/build.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/build.rs b/src/libstd/build.rs
index b3c71f4d81b..6652ff98201 100644
--- a/src/libstd/build.rs
+++ b/src/libstd/build.rs
@@ -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 -O2"));
+                .env("CFLAGS", cflags));
 
     run(Command::new(build_helper::make(host))
                 .current_dir(&native.out_dir)