[llvm-dev] A libc in LLVM

Cranmer, Joshua via llvm-dev llvm-dev at lists.llvm.org
Fri Jun 28 06:35:28 PDT 2019


From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of Finkel, Hal J. via llvm-dev
> One of my primary use cases for an LLVM libc is to take a subset of it and link
> it with our OpenMP device-side runtime library, or into code being compiled
> for CUDA/HIP/SYCL/etc. (so that we can support compiling code for
> accelerators (e.g., GPUs) that happens to call snprintf (or
> whatever) across platform from a variety of vendors).

IMHO, this is a very useful use case for an LLVM libc. But I worry that a libc that is driven by the desire to replace a fully functional POSIX library on architectures running full OSes would not be the sort of libc that is well-placed to be ported to architectures that have minimal to no OS capabilities.

It would be useful to take a step back and collect the features that all of the interested stakeholders would want in an LLVM libc before moving forward on a potential implementation, or even deciding if there is enough common ground to make a libc that would satisfy everyone's needs.


More information about the llvm-dev mailing list