[libcxx-commits] [libcxx] 49e5a89 - [libc++] Fix build on macOS older than 10.15.

Marek Kurdej via libcxx-commits libcxx-commits at lists.llvm.org
Fri Apr 2 01:37:52 PDT 2021


Author: Marek Kurdej
Date: 2021-04-02T10:32:54+02:00
New Revision: 49e5a896d1fc0d18263da5f832b125176a4338ae

URL: https://github.com/llvm/llvm-project/commit/49e5a896d1fc0d18263da5f832b125176a4338ae
DIFF: https://github.com/llvm/llvm-project/commit/49e5a896d1fc0d18263da5f832b125176a4338ae.diff

LOG: [libc++] Fix build on macOS older than 10.15.

* This was introduced in D99515 that added -Wundef flag. CI run on macOS 10.15 and this problem wasn't caught before.

Added: 
    

Modified: 
    libcxx/include/__config

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__config b/libcxx/include/__config
index d613c10fd08e..3acb17f05c09 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -393,10 +393,10 @@
 #  elif defined(__APPLE__)
      // timespec_get and aligned_alloc were introduced in macOS 10.15 and
      // aligned releases
-#    if (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101500 || \
-         __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130000 || \
-         __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ >= 130000 || \
-         __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ >= 60000)
+#    if ((defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101500) || \
+         (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130000) || \
+         (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ >= 130000) || \
+         (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ >= 60000))
 #      define _LIBCPP_HAS_ALIGNED_ALLOC
 #      define _LIBCPP_HAS_TIMESPEC_GET
 #    endif


        


More information about the libcxx-commits mailing list