[libc-commits] [libc] [libc] allow UnitTest suite to be compiled on darwin (PR #166062)

via libc-commits libc-commits at lists.llvm.org
Sun Nov 2 04:27:19 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Shreeyash Pandey (bojle)

<details>
<summary>Changes</summary>

ExecuteFunctionUnix.cpp which is guarded by this check should reliably work
on darwin as it only uses POSIX API - nothing specific to linux.


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


1 Files Affected:

- (modified) libc/test/UnitTest/CMakeLists.txt (+1-1) 


``````````diff
diff --git a/libc/test/UnitTest/CMakeLists.txt b/libc/test/UnitTest/CMakeLists.txt
index 31d1e9dce8204..028e8e3a2ea67 100644
--- a/libc/test/UnitTest/CMakeLists.txt
+++ b/libc/test/UnitTest/CMakeLists.txt
@@ -83,7 +83,7 @@ add_unittest_framework_library(
 )
 
 set(libc_death_test_srcs LibcDeathTestExecutors.cpp)
-if(${LIBC_TARGET_OS} STREQUAL "linux")
+if(${LIBC_TARGET_OS} STREQUAL "linux" OR ${LIBC_TARGET_OS} STREQUAL "darwin")
   list(APPEND libc_death_test_srcs ExecuteFunctionUnix.cpp)
 endif()
 

``````````

</details>


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


More information about the libc-commits mailing list