I am currently working on processor supporting RISC-V vector extension as a university project. I want to do some benchmarks on it and writing that in assembly would be a painful. Software is not my strongest side and I am having trouble configuring LLVM 14.0.0 support vector extension. Does anyone have a guide on how to set it up? Preferably with autovectorization. It works fine on CompilerExplorer: https://godbolt.org/z/8YebGee3W
Currently I have configured it like this:
cmake -G "Unix Makefiles" -DLLVM_ENABLE_PROJECTS="clang;lld;compiler-rt" \
-DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release ../llvm
If i compile with:
clang --target=riscv32 -march=rv32gcv test.c
I get following error:
ld.lld: error: unable to find library -lc
ld.lld: error: unable to find library -lm
ld.lld: error: unable to find library -lclang_rt.builtins-riscv32
clang-14: error: ld.lld command failed with exit code 1 (use -v to see invocation)
I am on Ubuntu 20.04 on an x86_64 system. Any help is appreciated.