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

via libc-commits libc-commits at lists.llvm.org
Thu Jun 12 14:39:18 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Uzair Nawaz (uzairnawaz)

<details>
<summary>Changes</summary>

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


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


1 Files Affected:

- (modified) libc/src/__support/CMakeLists.txt (+5-1) 


``````````diff
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)

``````````

</details>


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


More information about the libc-commits mailing list