MaskRay added a comment. In D127142#3601810 <https://reviews.llvm.org/D127142#3601810>, @yaxunl wrote:
> In D127142#3600809 <https://reviews.llvm.org/D127142#3600809>, @MaskRay wrote: > >> Magically deciding a default value for --unwindlib or --rtlib is not nice. >> You may emit a warning if the selected default happens to be incompatible >> with HIP. > > We build clang not just for compiling HIP programs. For C/C++ programs, we > want to use the default runtime and unwind library. One choice is that ensure the user specify `-DCMAKE_DEFAULT_RTLIB=compiler-rt`. (Since compiler-rt can be used with libgcc_s, -DCMAKE_DEFAULT_UNWINDLIB=libunwind is not strictly necessary.) > We only want to change the default runtime and unwind library for HIP. The correct place is `clang/lib/Driver/ToolChain.cpp ToolChain::GetUnwindLibType` (see `"platform"`). HIP should have its derived `ToolChain` to override the member function. 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