Skip to content

Conversation

@vhscampos
Copy link
Member

LLVM libcxx does not define the char8_t related functions, instead delegating their definitions to the underlying C library.

libcxx defines a macro called _LIBCPP_HAS_C8RTOMB_MBRTOC8 when it infers that the underlying C library provides these functions.

picolibc provides the char8_t related functions regardless of the C++ version used, but this support only landed after version 1.8.8 and, at the time of writing, has not made into any released version yet.

This is a temporary fix and should be removed when a picolibc release includes the support for char8_t and its related functions. When it's time to implement a proper solution, one needs to create logic to detect the picolibc version and define the macro accordingly. The macros that govern picolibc version are in picolibc.h.

LLVM libcxx does not define the `char8_t` related functions, instead
delegating their definitions to the underlying C library.

libcxx defines a macro called `_LIBCPP_HAS_C8RTOMB_MBRTOC8` when it
infers that the underlying C library provides these functions.

picolibc provides the `char8_t` related functions regardless of the
C++ version used, but this support only landed after version 1.8.8
and, at the time of writing, has not made into any released version
yet.

This is a temporary fix and should be removed when a picolibc
release includes the support for `char8_t` and its related
functions. When it's time to implement a proper solution, one needs
to create logic to detect the picolibc version and define the macro
accordingly. The macros that govern picolibc version are in
`picolibc.h`.
@vhscampos vhscampos merged commit 4a2939f into ARM-software:main Nov 1, 2024
1 check passed
@vhscampos vhscampos deleted the char8_t-support-macro-tmp-fix branch November 1, 2024 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants