[PATCH] D13673: Add initial support for the MUSL C library.
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 14 12:37:31 PDT 2015
EricWF requested changes to this revision.
EricWF added a comment.
This revision now requires changes to proceed.
Thanks for the quick turn around. This patch is almost ready to land but still needs a couple more changes.
================
Comment at: include/__config:387
@@ -385,1 +386,3 @@
#endif
+#else
+#define _LIBCPP_HAS_QUICK_EXIT
----------------
```#else // defined(_LIBCPP_HAS_MUSL_LIBC)```
================
Comment at: include/__config_site.in:21
@@ -20,2 +20,3 @@
#cmakedefine _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS
+#cmakedefine _LIBCPP_HAS_MUSL_LIBC
----------------
No need for whitespace.
================
Comment at: include/__locale:40
@@ -39,1 +39,3 @@
# include <xlocale.h>
+#elif defined(_LIBCPP_HAS_MUSL_LIBC)
+# include <support/musl/xlocale.h>
----------------
Since musl depends on support headers you should add a CMake check that ensures LIBCXX_INSTALL_SUPPORT_HEADERS is not turned off when LIBCXX_LIBC_IS_MUSL is ON.
================
Comment at: include/support/musl/xlocale.h:21
@@ +20,3 @@
+
+#include <cstdlib>
+
----------------
It looks like this header uses more symbols than are just provided by `cstdlib`. Please add the required includes.
================
Comment at: src/locale.cpp:958
@@ -957,3 +961,3 @@
return static_cast<char>(__classic_lower_table()[static_cast<unsigned char>(c)]);
-#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__)
return isascii(c) ?
----------------
Where did the `__NetBSD__` case go?
http://reviews.llvm.org/D13673
More information about the cfe-commits
mailing list