[PATCH] D57829: [HIP] Disable emitting llvm.linker.options in device compilation
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 6 11:12:03 PST 2019
tra added a comment.
Could you elaborate on why you want to disable this metadata? I think the original idea of llvm.linker.options was that it should be ignored if the back-end does not support it.
================
Comment at: lib/CodeGen/CodeGenModule.cpp:441
if (CodeGenOpts.Autolink &&
+ !(Context.getLangOpts().CUDAIsDevice && Context.getLangOpts().HIP) &&
(Context.getLangOpts().Modules || !LinkerOptionsMetadata.empty())) {
----------------
If we do need to disable it, it may be better to do it in
`ShouldDisableAutolink()` function in clang/lib/Driver/ToolChains/Clang.cpp
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57829/new/
https://reviews.llvm.org/D57829
More information about the cfe-commits
mailing list