Skip to content

Commit a876988

Browse files
committed
Provide a warning if RUNTIMES_USE_LIBC is not used
1 parent f892007 commit a876988

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

libcxx/include/__configuration/platform.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,14 @@
4343
#endif
4444

4545
// TODO: Remove this deprecated behavior after LLVM 22 release
46-
// To build libc++ with picolibc provide RUNTIMES_USE_LIBC=picolibc
47-
#if __has_include(<picolibc.h>)
46+
#if __has_include(<picolibc.h>) && !defined(LIBCXX_LIBC_NEWLIB)
4847
# define LIBCXX_LIBC_NEWLIB
48+
49+
# if defined(__clang__) || defined(__GNUC__)
50+
# warning "To build libc++ with picolibc provide RUNTIMES_USE_LIBC=picolibc"
51+
# else
52+
# pragma message("To build libc++ with picolibc provide RUNTIMES_USE_LIBC=picolibc")
53+
# endif
4954
#endif
5055

5156
#ifndef __BYTE_ORDER__

0 commit comments

Comments
 (0)