Skip to content

Conversation

voltur01
Copy link
Contributor

@voltur01 voltur01 commented Jul 8, 2025

This is a prototype (i.e. not intended to be merged directly) to avoid downstream change #378 and solve the issue of including picolibc.h or newlib.h directly.

It makes use of CMake LIBCXX_LIBC option to set the library at build time and generate C defines to detect the C library in C++ code.

This works with picolibc and newlib. llvm-libc option cannot be enabled yet, because it causes extra command line options to be passed to libcxxabi that is added in ATfE CMake in one step with libcxx itself - needs a refactoring to split these.

This is a prototype (i.e. not intended to be merged directly) to avoid downstream change arm#378 and solve the issue of including picolibc.h or newlib.h directly.

It makes use of CMake LIBCXX_LIBC option to set the library at build time and generate C defines to detect the C library in C++ code.

This works with picolibc and newlib. llvm-libc option cannot be enabled yet, because it causes extra command line options to be passed to libcxxabi that is added in ATfE CMake in one step with libcxx itself - needs a refactoring to split these.
@voltur01 voltur01 requested review from a team as code owners July 8, 2025 14:00
@voltur01
Copy link
Contributor Author

voltur01 commented Jul 9, 2025

Was discussed in the libc++ monthly sync on 08-07-2025 and agreed that it is an acceptable approach.

@voltur01
Copy link
Contributor Author

Upstream PR llvm/llvm-project#147956

@voltur01 voltur01 closed this Aug 1, 2025
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.

1 participant