[libcxx] [llvm] [libc++] Add support for picolibc and newlib in RUNTIMES_USE_LIBC (PR #147956)

Lucas Duarte Prates via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 15 08:46:32 PDT 2025


================
@@ -42,11 +42,10 @@
 #  endif
 #endif
 
-// This is required in order for _NEWLIB_VERSION to be defined in places where we use it.
-// TODO: We shouldn't be including arbitrarily-named headers from libc++ since this can break valid
-//       user code. Move code paths that need _NEWLIB_VERSION to another customization mechanism.
+// TODO: Remove this deprecated behavior after LLVM 22 release
+// To build libc++ with picolibc provide RUNTIMES_USE_LIBC=picolibc
 #if __has_include(<picolibc.h>)
-#  include <picolibc.h>
+#  define LIBCXX_LIBC_NEWLIB
----------------
pratlucas wrote:

Brilliant! Thanks

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


More information about the llvm-commits mailing list