Skip to content

Commit

Permalink
Only set the flag in LLVM builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
aspen committed Jun 30, 2020
1 parent e191358 commit c22bcb0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/bootstrap/lib.rs
Expand Up @@ -811,11 +811,6 @@ impl Build {
if target.contains("apple-darwin") {
base.push("-stdlib=libc++".into());
}

// Required for LLVM to properly compile.
if target.contains("apple-ios") {
base.push("-miphoneos-version-min=10.0".into());
}

// Work around an apparently bad MinGW / GCC optimization,
// See: http://lists.llvm.org/pipermail/cfe-dev/2016-December/051980.html
Expand Down
3 changes: 3 additions & 0 deletions src/bootstrap/native.rs
Expand Up @@ -420,6 +420,9 @@ fn configure_cmake(
if let Some(ref s) = builder.config.llvm_cflags {
cflags.push_str(&format!(" {}", s));
}
if target.contains("apple-ios") {
cflags.push_str(" -miphoneos-version-min=10.0");
}
cfg.define("CMAKE_C_FLAGS", cflags);
let mut cxxflags = builder.cflags(target, GitRepo::Llvm).join(" ");
if builder.config.llvm_static_stdcpp && !target.contains("msvc") && !target.contains("netbsd") {
Expand Down

0 comments on commit c22bcb0

Please sign in to comment.