[PATCH] D158582: [AMDGPU] Respect unresolved symbol option if forwarded to linker

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 23 07:24:48 PDT 2023


yaxunl added a comment.

The `-Wl` and `-Xlinker` options are intended for the host linker and we intentionally do not pass them to the device linker.

If users want to pass options to the device linker, they need to use -Xoffload-linker.

There are multiple options affecting the handling of unresolved symbols. I think the proper way is to use `--no-undefined` as the default, which is always passed before those options from `-Xoffload-linker` so that the latter can override the former.

I believe the driver already passes `-Xoffload-linker`  options to amdgpu::Linker::ConstructJob by Args. I think we probably only need to move all the default options (line 563-566) to 554 so that they can be overridden.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158582/new/

https://reviews.llvm.org/D158582



More information about the cfe-commits mailing list