[libcxx-commits] [libcxx] [libcxx] Define _LIBCPP_HAS_C8RTOMB_MBRTOC8 for picolibc (PR #152724)

Victor Campos via libcxx-commits libcxx-commits at lists.llvm.org
Mon Aug 11 07:19:30 PDT 2025


vhscampos wrote:

I've refactored in a way that the macro is true "by default" as you suggested.

However, with regards to always setting it to true if compiling with clang, that causes a libcxx test to fail (link: https://github.com/llvm/llvm-project/blob/372d86dcf1adf90f994be60bb017d92455abb879/libcxx/test/std/strings/c.strings/cuchar.compile.pass.cpp#L26)

The value of macro `TEST_HAS_NO_C8RTOMB_MBRTOC8` depends on `_LIBCPP_HAS_C8RTOMB_MBRTOC8` (link: https://github.com/llvm/llvm-project/blob/372d86dcf1adf90f994be60bb017d92455abb879/libcxx/test/support/test_macros.h#L453), so if we always set it to true for clang, this test fails if the functions aren't defined in the C library.

I couldn't think of a way to modify the test in order to have the macro true for clang.

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


More information about the libcxx-commits mailing list