[libcxx-commits] [libcxx] [libc++] Fix missing availability check for visionOS in apple_availability.h (PR #187015)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Mar 17 06:04:26 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Louis Dionne (ldionne)
<details>
<summary>Changes</summary>
Without this, we were assuming that __ulock was unavailable on visionOS and falling back to the manual implementation, when in reality we can always rely on the existence of ulock.
Fixes #<!-- -->186467
---
Full diff: https://github.com/llvm/llvm-project/pull/187015.diff
1 Files Affected:
- (modified) libcxx/src/include/apple_availability.h (+4)
``````````diff
diff --git a/libcxx/src/include/apple_availability.h b/libcxx/src/include/apple_availability.h
index fc2ad15065416..715e187546923 100644
--- a/libcxx/src/include/apple_availability.h
+++ b/libcxx/src/include/apple_availability.h
@@ -27,6 +27,10 @@
# if __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ >= 60000
# define _LIBCPP_USE_ULOCK
# endif
+# elif defined(__ENVIRONMENT_OS_VERSION_MIN_REQUIRED__) && __is_target_os(visionos)
+# if __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ >= 10000
+# define _LIBCPP_USE_ULOCK
+# endif
# endif // __ENVIRONMENT_.*_VERSION_MIN_REQUIRED__
#endif // __APPLE__
``````````
</details>
https://github.com/llvm/llvm-project/pull/187015
More information about the libcxx-commits
mailing list