Skip to content

[libc] Prevent building wchar on MacOS #143978

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2025

Conversation

uzairnawaz
Copy link
Contributor

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

@llvmbot llvmbot added the libc label Jun 12, 2025
@llvmbot
Copy link
Member

llvmbot commented Jun 12, 2025

@llvm/pr-subscribers-libc

Author: Uzair Nawaz (uzairnawaz)

Changes

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

@uzairnawaz uzairnawaz merged commit 2ee8fdb into llvm:main Jun 12, 2025
15 checks passed
tomtor pushed a commit to tomtor/llvm-project that referenced this pull request Jun 14, 2025
Prevent building wchar on macos as it depends on uchar.h which isn't
available
akuhlens pushed a commit to akuhlens/llvm-project that referenced this pull request Jun 24, 2025
Prevent building wchar on macos as it depends on uchar.h which isn't
available
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants