[libcxx-commits] [PATCH] D141184: [libc++] Fix aligned_alloc usage for Android
Shoaib Meenai via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jan 6 23:36:18 PST 2023
smeenai created this revision.
smeenai added reviewers: arichardson, danalbert, rprichard.
Herald added subscribers: danielkiss, krytarowski.
Herald added a project: All.
smeenai requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
Android only provides this function on API 28+; fix libc++ builds when
targeting older API levels.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D141184
Files:
libcxx/include/__config
Index: libcxx/include/__config
===================================================================
--- libcxx/include/__config
+++ libcxx/include/__config
@@ -727,6 +727,9 @@
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101500)
# 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
# endif
# if defined(__APPLE__) || defined(__FreeBSD__)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141184.487058.patch
Type: text/x-patch
Size: 536 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230107/739849cf/attachment.bin>
More information about the libcxx-commits
mailing list