Issue |
123164
|
Summary |
Confusing CMake option related to llvm_runtime component compiler-rt
|
Labels |
new issue
|
Assignees |
|
Reporter |
AugustineYang
|
I have encountered an issue related to llvm_runtime component compiler-rt. When linking a riscv32 assembly code with ld.lld, I got an error saying `ld.lld: error: cannot open ....../libclang_rt.builtins.a: No such file or directory`. After searching for previous issues like [#87150](https://github.com/llvm/llvm-project/issues/87150), [#72862](https://discourse.llvm.org/t/libclang-rt-builtins-a-is-not-being-built/72862), [How to build libclang_rt.builtins.a?](https://stackoverflow.com/questions/76936217/how-to-build-libclang-rt-builtins-a), it seems that the issue happens because of the lack of building "compiler-rt".
After digging into the [Clang Doc](https://clang.llvm.org/docs/Toolchain.html#compiler-rt-llvm) and the CMakeLists file, it turns out that CMake option `-DLLVM_ENABLE_RUNTIMES=all` will only build default runtime components "libcxx;libcxxabi;libunwind" rather than all supported runtime components "libc;libunwind;libcxxabi;pstl;libcxx;compiler-rt;openmp;llvm-libgcc;offload". This can result in the possible omission of building the compiler-rt.
Since many people have encountered the issue due to this confusing "all" options, maybe we should add a "default" option for building "default runtime components", and use "all" option to build "all supported runtime components".
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs