diff options
| author | aspen <luxx4x@protonmail.com> | 2020-06-30 17:56:31 -0400 |
|---|---|---|
| committer | aspen <luxx4x@protonmail.com> | 2020-06-30 17:56:31 -0400 |
| commit | c22bcb03814a1600d17097123813495ea0a40796 (patch) | |
| tree | 777c40eb1f3ac2d00a7271269019d6b00a8ca06d /src | |
| parent | e1913587889b0b1147531c370d9c810b46b5971e (diff) | |
| download | rust-c22bcb03814a1600d17097123813495ea0a40796.tar.gz rust-c22bcb03814a1600d17097123813495ea0a40796.zip | |
Only set the flag in LLVM builds.
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/lib.rs | 5 | ||||
| -rw-r--r-- | src/bootstrap/native.rs | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index b11a7fc6255..b611af54565 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -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 diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index e35ffb304bc..c10e8723422 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -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") { |
