[PATCH] D155398: Linker is unable to find -lclang_rt.builtins-riscv64 library
Ramakota Reddy via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 16 03:05:37 PDT 2023
ramakotareddy added a comment.
hello.c:
--------
int main() {
return 0;
}
Issue:
------
With this command `build/bin/clang -mcpu=generic-rv64 hello.c` getting below error.
**Error: ld.lld: error: unable to find library -lclang_rt.builtins-riscv64**
After this fix able to run the simple c program using `build/bin/clang -mcpu=generic-rv64 hello.c` command.
-> I have used below configure options
LD=lld-11 CC='clang-11' CXX='clang++-11' /usr/bin/cmake -S llvm -B build -G "Ninja" -DLLVM_TARGETS_TO_BUILD="RISCV" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/llvm_install/ -DLLVM_ENABLE_PROJECTS="clang;lld" -DLLVM_ENABLE_BINDINGS=false -DDEFAULT_SYSROOT="/tmp/64riscv_linux_gnu_build/install_dir/riscv64-unknown-elf/" -DLLVM_ENABLE_RUNTIMES="compiler-rt" -DLLVM_BUILD_TESTS=false -DLLVM_DEFAULT_TARGET_TRIPLE="riscv64-unknown-elf" -DCOMPILER_RT_BAREMETAL_BUILD=ON
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155398/new/
https://reviews.llvm.org/D155398
More information about the llvm-commits
mailing list