yaxunl added a comment. In D127142#3568905 <https://reviews.llvm.org/D127142#3568905>, @MaskRay wrote:
>> These functions are not available in libgcc but in libclang_rt.builtins. >> Therefore --hip-link needs to link with libclang_rt.builtins by default. > > I think this is problematic. > > The current link sequence is `... "-lamdhip64" > "/tmp/Debug/lib/clang/15.0.0/lib/linux/libclang_rt.builtins-x86_64.a" "-lgcc" > "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" > "-lgcc_s" "--no-as-needed" "/usr/lib/gcc/x86_64-linux-gnu/12/crtendS.o" > "/lib/x86_64-linux-gnu/crtn.o"` > > Linking in libclang_rt.builtins is incompatible with libgcc. There may be > subtle symbol resolving issues. I don't think silently changing the behavior > is desired. > Perhaps `--rocm-path` should require `--rtlib=compiler-rt`. See the > `--rtlib=libgcc requires --unwindlib=libgcc` diagnostic. > > Your user will need to do a bit more work if `CLANG_DEFAULT_RTLIB` is not > `compiler-rt`. If I use --rtlib=compiler-rt, does that also requires --unwindlib=unwindlib ? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127142/new/ https://reviews.llvm.org/D127142 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits