[PATCH] D154881: [HIP] Ignore host linker flags for device-only
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 10 13:25:39 PDT 2023
yaxunl added inline comments.
================
Comment at: clang/lib/Driver/Driver.cpp:4150
+ (C.getInputArgs().hasArg(options::OPT_emit_llvm))) &&
+ !C.getInputArgs().hasArg(options::OPT_offload_device_only))
LinkerInputs.push_back(Current);
----------------
The --hip-link -fgpu-rdc --offload-device-only case needs to add the linker inputs e.g. archive of bundled bitcodes. Need a test to make sure that still works.
Also you need to use Driver::offloadDeviceOnly() to check whether it is device compilation only
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154881/new/
https://reviews.llvm.org/D154881
More information about the cfe-commits
mailing list