[libc-commits] [libc] [libc] allow UnitTest suite to be compiled on darwin (PR #166062)
Shreeyash Pandey via libc-commits
libc-commits at lists.llvm.org
Sun Nov 2 04:26:52 PST 2025
https://github.com/bojle created https://github.com/llvm/llvm-project/pull/166062
ExecuteFunctionUnix.cpp which is guarded by this check should reliably work
on darwin as it only uses POSIX API - nothing specific to linux.
>From ab85f49f93c777b94648b5c5bf721753950b4308 Mon Sep 17 00:00:00 2001
From: Shreeyash Pandey <shreeyash335 at gmail.com>
Date: Sun, 2 Nov 2025 16:38:36 +0530
Subject: [PATCH] [libc] allow UnitTest suite to be compiled on darwin
ExecuteFunctionUnix.cpp which is guarded by this check should reliably work
on darwin as it only uses POSIX API - nothing specific to linux.
---
libc/test/UnitTest/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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()
More information about the libc-commits
mailing list