Only set the flag in LLVM builds.

This commit is contained in:
aspen 2020-06-30 17:56:31 -04:00
parent e191358788
commit c22bcb0381
No known key found for this signature in database
GPG Key ID: 732932968965DE56
2 changed files with 3 additions and 5 deletions

View File

@ -811,11 +811,6 @@ fn cflags(&self, target: Interned<String>, which: GitRepo) -> Vec<String> {
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

View File

@ -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") {