[libcxx] [llvm] [libc++] Add support for picolibc and newlib in RUNTIMES_USE_LIBC (PR #147956)
Volodymyr Turanskyy via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 11 06:58:58 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
----------------
voltur01 wrote:
Good point, I tried, however this make the buildbot to fail as it has warnings-as-errors on. Moreover, even a simple pragma message also causes it to fail as the test output does not match the expectation.
So I do not have a good solution to warn users proactively.
https://github.com/llvm/llvm-project/pull/147956
More information about the llvm-commits
mailing list