[libcxx-commits] [libcxx] [libc++] Don't use aligned_alloc on iOS versions before 13 (PR #110315)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Sep 27 12:11:40 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: None (Un1q32)
<details>
<summary>Changes</summary>
There's a check here to not use aligned_alloc on macOS versions before 10.15, this patch adds an equivalent check that tests for iOS 13.
---
Full diff: https://github.com/llvm/llvm-project/pull/110315.diff
1 Files Affected:
- (modified) libcxx/include/__config (+4)
``````````diff
diff --git a/libcxx/include/__config b/libcxx/include/__config
index f90c966aad6950..0d71264611ff66 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -649,6 +649,10 @@ typedef __char32_t char32_t;
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101500)
# define _LIBCPP_HAS_NO_C11_ALIGNED_ALLOC
# endif
+# if (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && \
+ __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 130000)
+# define _LIBCPP_HAS_NO_C11_ALIGNED_ALLOC
+# endif
# elif defined(__ANDROID__) && __ANDROID_API__ < 28
// Android only provides aligned_alloc when targeting API 28 or higher.
# define _LIBCPP_HAS_NO_C11_ALIGNED_ALLOC
``````````
</details>
https://github.com/llvm/llvm-project/pull/110315
More information about the libcxx-commits
mailing list