[PATCH] D57829: [CUDA][HIP] Disable emitting llvm.linker.options in device compilation
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 31 13:10:56 PDT 2019
yaxunl added a comment.
In D57829#1729094 <https://reviews.llvm.org/D57829#1729094>, @tra wrote:
> Could you, please, give us a bit more context and provide more info for the questions @rjmccall and I asked before?
>
> Is the problem specifically because autolink is not supported on device side? Or is disabling autolink just a convoluted way to avoid calling EmitModuleLinkOptions()?
> If it's the former, then we should just disable it unconditionally -- we already filter out some other flags (e.g. asan).
> If it's the latter, then tweaking autolink option behavior is just covering the problem. Sooner or later EmitModuleLinkOptions() will be called by something else and we'll be back to where we are now.
we need to disable autolink for device compilation because the linker options are intended for host compilation.
Previously I said the backend does not support linker option, which was incorrect. The diagnostic about invalid linker option was due to a clang codegen bug due to detect_mismatch, which I have a fix
https://reviews.llvm.org/D69678
Even with that fix, we still need to disable auto link for device compilation, since it is intended for host compilation.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57829/new/
https://reviews.llvm.org/D57829
More information about the cfe-commits
mailing list