Skip to content

[libc++] Add watchOS and tvOS checks for aligned_alloc #126862

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

Un1q32
Copy link
Contributor

@Un1q32 Un1q32 commented Feb 12, 2025

Adds the equivalent watchOS and tvOS version checks to check for support for aligned_alloc, we already have macOS and iOS checks.

@Un1q32 Un1q32 requested a review from a team as a code owner February 12, 2025 06:26
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Feb 12, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 12, 2025

@llvm/pr-subscribers-libcxx

Author: None (Un1q32)

Changes

Adds the equivalent watchOS and tvOS version checks to check for support for aligned_alloc, we already have macOS and iOS checks.


Full diff: https://github.com/llvm/llvm-project/pull/126862.diff

1 Files Affected:

  • (modified) libcxx/include/__config (+4-1)
diff --git a/libcxx/include/__config b/libcxx/include/__config
index 1c6dd8f36c32f..d34f507e9d34e 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -663,7 +663,10 @@ typedef __char32_t char32_t;
 #    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)
+         __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 130000) ||                                                   \
+        (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) &&                                                     \
+         __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 60000) ||                                                     \
+        (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 130000)
 #      define _LIBCPP_HAS_C11_ALIGNED_ALLOC 0
 #    else
 #      define _LIBCPP_HAS_C11_ALIGNED_ALLOC 1

@philnik777 philnik777 requested a review from ldionne February 12, 2025 09:08
@ldionne ldionne changed the title add watchOS and tvOS checks for aligned_alloc in libc++ [libc++] Add watchOS and tvOS checks for aligned_alloc Feb 17, 2025
@ldionne ldionne merged commit 949e404 into llvm:main Feb 17, 2025
78 checks passed
@Un1q32 Un1q32 deleted the watchos-fix branch February 27, 2025 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants