[llvm] [Offload] Add support for riscv64 to host plugin (PR #115773)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 23 08:31:37 PST 2024


jhuber6 wrote:

> > Add the triple to
> > https://github.com/llvm/llvm-project/blob/0e3c791916a918cd2d7391ddb633fbe5faa00b86/clang/lib/Frontend/CompilerInvocation.cpp#L4228
> 
> Thank you. It works now. But for some cases, there are still some errors. For example: ld: /tmp/test_target_firstprivate-12cba4.o: in function `main': test_target_firstprivate.c:(.text+0xf6): undefined reference to '__kmpc_fork_call'
> 
> Do we need to add extra support for riscv64 in kmp related codes?

There should be some RISCV definitions in `libomp` but you'd probably need to check there. If you're not getting that defined it means you're not linking `libomp` or something. Also I think you might need to add it to https://github.com/llvm/llvm-project/blob/70bd80dc51b62453210f6203c31ea826dd0675c2/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp#L596

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


More information about the llvm-commits mailing list