[PATCH] D152207: [HIP] Instruct lld to go through all archives
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 6 08:05:44 PDT 2023
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
More information about the cfe-commits
mailing list