[libc-commits] [libc] [libc] Prevent building wchar on MacOS (PR #143978)

Uzair Nawaz via libc-commits libc-commits at lists.llvm.org
Thu Jun 12 14:38:48 PDT 2025


https://github.com/uzairnawaz created https://github.com/llvm/llvm-project/pull/143978

Prevent building wchar on macos as it depends on uchar.h which isn't available


>From d17e9f28312d671eaa1d04e023f2ebb4abba7717 Mon Sep 17 00:00:00 2001
From: Uzair Nawaz <uzairnawaz at google.com>
Date: Thu, 12 Jun 2025 21:36:56 +0000
Subject: [PATCH] build fix

---
 libc/src/__support/CMakeLists.txt | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libc/src/__support/CMakeLists.txt b/libc/src/__support/CMakeLists.txt
index 309cde76370f0..7e85136c08851 100644
--- a/libc/src/__support/CMakeLists.txt
+++ b/libc/src/__support/CMakeLists.txt
@@ -391,6 +391,10 @@ add_subdirectory(fixed_point)
 
 add_subdirectory(time)
 
-add_subdirectory(wchar)
+# Requires access to uchar header which is not on macos
+# Therefore, cannot currently build this on macos in overlay mode
+if(NOT(LIBC_TARGET_OS_IS_DARWIN))
+  add_subdirectory(wchar)
+endif()
 
 add_subdirectory(math)



More information about the libc-commits mailing list