[compiler-rt] [compiler-rt] Allow building builtins.a without a libc (PR #86737)

Petr Hosek via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 26 14:06:53 PDT 2024


petrhosek wrote:

> Hmm - FWIW, for doing this kind of bootstrap, it's already possible by building the builtins library on its own, standalone from the rest of compiler-rt, by pointing cmake at `compiler-rt/lib/builtins`, usually also setting `CMAKE_C_COMPILER_WORKS=TRUE` and `CMAKE_CXX_COMPILER_WORKS=TRUE` at the same time, to waive some sanity checks.

Yes, this scenario is supported by the bootstrapping build which uses `compiler-rt/lib/builtins` to build builtins before anything else. We use it to build compiler-rt builtins without libc for a number of targets and have been doing that for several years now.

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


More information about the llvm-commits mailing list