Can we have a good support of freestanding C++?

GCC’s libstdc++ provides --disable-hosted-libstdcxx, please provide a similar toggle to libc++ to only build freestanding implementation to avoid libc dependencies.

A lot of libc implementations are not C++ compliant.

Or i just want to use C++ to write kernel or the libc themselves.

newlib does not support all the platforms i care about (like UEFI) and it has licensing being GPL.

Do you have anything specific that doesn’t work? We try to support freestanding environments and try to enable as much of the standard library as possible there. We try to rely on as little of the C standard library as possible by using [[clang::using_if_exists]] on the using declarations that pull the C standard library into namespace std.