================
@@ -548,6 +551,12 @@ Expected<StringRef> clang(ArrayRef<StringRef> InputFiles,
const ArgList &Args,
if (!Triple.isNVPTX() && !Triple.isSPIRV())
CmdArgs.push_back("-Wl,--no-undefined");
+ // The device inputs are bitcode stored in files with an object extension.
+ // Force the IR input language so Clang runs the compile and backend phases
+ // instead of treating them as linker inputs, which would defer codegen to
+ // the LTO link and defeat the non-LTO pipeline.
+ if (NonLTOAMDGPU)
+ CmdArgs.append({"-x", "ir"});
----------------
jhuber6 wrote:
I was referring to PGO, the other libraries are indeed linked via `-mlink`.
https://github.com/llvm/llvm-project/pull/201135
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits