Skip to content

Commit c22bcb0

Browse files
author
aspen
committed
Only set the flag in LLVM builds.
1 parent e191358 commit c22bcb0

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/bootstrap/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -811,11 +811,6 @@ impl Build {
811811
if target.contains("apple-darwin") {
812812
base.push("-stdlib=libc++".into());
813813
}
814-
815-
// Required for LLVM to properly compile.
816-
if target.contains("apple-ios") {
817-
base.push("-miphoneos-version-min=10.0".into());
818-
}
819814

820815
// Work around an apparently bad MinGW / GCC optimization,
821816
// See: http://lists.llvm.org/pipermail/cfe-dev/2016-December/051980.html

src/bootstrap/native.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,9 @@ fn configure_cmake(
420420
if let Some(ref s) = builder.config.llvm_cflags {
421421
cflags.push_str(&format!(" {}", s));
422422
}
423+
if target.contains("apple-ios") {
424+
cflags.push_str(" -miphoneos-version-min=10.0");
425+
}
423426
cfg.define("CMAKE_C_FLAGS", cflags);
424427
let mut cxxflags = builder.cflags(target, GitRepo::Llvm).join(" ");
425428
if builder.config.llvm_static_stdcpp && !target.contains("msvc") && !target.contains("netbsd") {

0 commit comments

Comments
 (0)