[libcxx-commits] [libcxx] [libc++] remove apple_availablity.h (PR #192851)

via libcxx-commits libcxx-commits at lists.llvm.org
Sun Apr 19 07:16:52 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Hui (huixie90)

<details>
<summary>Changes</summary>



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


4 Files Affected:

- (modified) libcxx/src/CMakeLists.txt (-1) 
- (modified) libcxx/src/atomic.cpp (+1-3) 
- (modified) libcxx/src/chrono.cpp (-1) 
- (removed) libcxx/src/include/apple_availability.h (-38) 


``````````diff
diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
index ebd6141902ef7..de7817ad69f26 100644
--- a/libcxx/src/CMakeLists.txt
+++ b/libcxx/src/CMakeLists.txt
@@ -15,7 +15,6 @@ set(LIBCXX_SOURCES
   filesystem/path.cpp
   functional.cpp
   hash.cpp
-  include/apple_availability.h
   include/atomic_support.h
   include/config_elast.h
   include/refstring.h
diff --git a/libcxx/src/atomic.cpp b/libcxx/src/atomic.cpp
index 12ff253048e3e..4d3064a2c9b79 100644
--- a/libcxx/src/atomic.cpp
+++ b/libcxx/src/atomic.cpp
@@ -17,8 +17,6 @@
 #include <thread>
 #include <type_traits>
 
-#include "include/apple_availability.h"
-
 #ifdef __linux__
 
 #  include <linux/futex.h>
@@ -94,7 +92,7 @@ static void __platform_wake_by_address(void const* __ptr, bool __notify_one) {
   _LIBCPP_FUTEX(__ptr, FUTEX_WAKE_PRIVATE, __notify_one ? 1 : INT_MAX, 0, 0, 0);
 }
 
-#elif defined(__APPLE__) && defined(_LIBCPP_USE_ULOCK)
+#elif defined(__APPLE__)
 
 extern "C" int __ulock_wait(
     uint32_t operation, void* addr, uint64_t value, uint32_t timeout); /* timeout is specified in microseconds */
diff --git a/libcxx/src/chrono.cpp b/libcxx/src/chrono.cpp
index a27efc5a42b5d..77010a2bead6d 100644
--- a/libcxx/src/chrono.cpp
+++ b/libcxx/src/chrono.cpp
@@ -20,7 +20,6 @@
 #  include <__support/ibm/gettod_zos.h> // gettimeofdayMonotonic
 #endif
 
-#include "include/apple_availability.h"
 #include <time.h> // clock_gettime and CLOCK_{MONOTONIC,REALTIME,MONOTONIC_RAW}
 
 #if __has_include(<unistd.h>)
diff --git a/libcxx/src/include/apple_availability.h b/libcxx/src/include/apple_availability.h
deleted file mode 100644
index 715e187546923..0000000000000
--- a/libcxx/src/include/apple_availability.h
+++ /dev/null
@@ -1,38 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef _LIBCPP_SRC_INCLUDE_APPLE_AVAILABILITY_H
-#define _LIBCPP_SRC_INCLUDE_APPLE_AVAILABILITY_H
-
-#if defined(__APPLE__)
-
-#  if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
-#    if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101500
-#      define _LIBCPP_USE_ULOCK
-#    endif
-#  elif defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
-#    if __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130000
-#      define _LIBCPP_USE_ULOCK
-#    endif
-#  elif defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__)
-#    if __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ >= 130000
-#      define _LIBCPP_USE_ULOCK
-#    endif
-#  elif defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__)
-#    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__
-
-#endif // _LIBCPP_SRC_INCLUDE_APPLE_AVAILABILITY_H

``````````

</details>


https://github.com/llvm/llvm-project/pull/192851


More information about the libcxx-commits mailing list