[libc-commits] [libc] [libc] Add Darwin mutex support via os_sync primitives (PR #167722)
via libc-commits
libc-commits at lists.llvm.org
Mon Dec 1 10:40:16 PST 2025
================
@@ -23,13 +23,36 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
add_subdirectory(${LIBC_TARGET_OS})
endif()
-if(TARGET libc.src.__support.threads.${LIBC_TARGET_OS}.mutex)
+if(TARGET libc.src.__support.threads.${LIBC_TARGET_OS}.futex_utils)
add_header_library(
mutex
HDRS
- mutex.h
+ mutex.h
+ DEPENDS
+ .unix_mutex
+ )
+ add_header_library(
+ unix_mutex
+ HDRS
+ unix_mutex.h
+ DEPENDS
+ .raw_mutex
+ )
+
+ add_header_library(
+ raw_mutex
+ HDRS
+ raw_mutex.h
DEPENDS
- .${LIBC_TARGET_OS}.mutex
+ .${LIBC_TARGET_OS}.futex_utils
+ libc.src.__support.threads.sleep
+ libc.src.__support.time.abs_timeout
+ libc.src.__support.time.monotonicity
+ libc.src.__support.CPP.optional
+ libc.hdr.types.pid_t
+ COMPILE_OPTIONS
----------------
lntue wrote:
move `COMPILE_OPTIONS` above `DEPENDS`.
https://github.com/llvm/llvm-project/pull/167722
More information about the libc-commits
mailing list