[libcxx-commits] [libcxx] [libc++] remove apple_availablity.h (PR #192851)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Apr 19 07:16:21 PDT 2026
https://github.com/huixie90 created https://github.com/llvm/llvm-project/pull/192851
None
>From e833d12a0ed171f301a93ca2079b066491818869 Mon Sep 17 00:00:00 2001
From: Hui Xie <hui.xie1990 at gmail.com>
Date: Sun, 19 Apr 2026 15:15:57 +0100
Subject: [PATCH] [libc++] remove apple_availablity.h
---
libcxx/src/CMakeLists.txt | 1 -
libcxx/src/atomic.cpp | 4 +--
libcxx/src/chrono.cpp | 1 -
libcxx/src/include/apple_availability.h | 38 -------------------------
4 files changed, 1 insertion(+), 43 deletions(-)
delete mode 100644 libcxx/src/include/apple_availability.h
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
More information about the libcxx-commits
mailing list