]> git.lizzy.rs Git - rust.git/commitdiff
Explicitly check for iOS/tvOS.
authoraspen <luxx4x@protonmail.com>
Wed, 1 Jul 2020 17:19:09 +0000 (13:19 -0400)
committeraspen <luxx4x@protonmail.com>
Wed, 1 Jul 2020 17:19:09 +0000 (13:19 -0400)
src/bootstrap/native.rs

index 70c292e229da88f6010a5d1977a5df6d7b798356..cceb7941650592f51b48ccb74523ad4960e4e564 100644 (file)
@@ -176,7 +176,7 @@ fn run(self, builder: &Builder<'_>) -> PathBuf {
         }
 
         // Are we compiling for iOS/tvOS?
-        if target.contains("apple") && !target.contains("darwin") {
+        if target.contains("apple-ios") || target.contains("apple-tvos") {
             // These two defines prevent CMake from automatically trying to add a MacOSX sysroot, which leads to a compiler error.
             cfg.define("CMAKE_OSX_SYSROOT", "/");
             cfg.define("CMAKE_OSX_DEPLOYMENT_TARGET", "");