[libcxx-commits] [libcxx] [libc++] Avoid including <features.h> on arbitrary platforms (PR #125587)

Petr Hosek via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 5 00:11:24 PST 2025


petrhosek wrote:

This is going to break other platforms supported by LLVM libc, most notably baremetal (for which we don't really have a great detection mechanism since there's no OS).

An alternative to using a header would be to store the value of [`LIBCXX_LIBC`](https://github.com/llvm/llvm-project/blob/646d352ab0d0a9cfafa3f2c9c415b5773834ad5b/libcxx/CMakeLists.txt#L231) CMake option in `__config_site` and then use that. This could also eventually replace [`_LIBCPP_HAS_MUSL_LIBC`](https://github.com/llvm/llvm-project/blob/646d352ab0d0a9cfafa3f2c9c415b5773834ad5b/libcxx/include/__config_site.in#L19).

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


More information about the libcxx-commits mailing list