yaxunl added inline comments.
================ Comment at: clang/lib/Driver/ToolChains/HIPAMD.cpp:168 + // the linker to go through every library to look for kernel functions + LldArgs.push_back("--whole-archive"); auto TargetID = Args.getLastArgValue(options::OPT_mcpu_EQ); ---------------- Better move this before line 155 to allow users to override this option. Please add a comment that the device linker will not try to resolve a device variable or kernel that is referenced by a host object in the archive which in turn is referenced by a host object not in the archive, therefore --whole-archive is needed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152207/new/ https://reviews.llvm.org/D152207 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits