================
@@ -9220,13 +9220,24 @@ void LinkerWrapper::ConstructJob(Compilation &C, const
JobAction &JA,
for (StringRef Arg : LinkerArgs)
CmdArgs.push_back(Args.MakeArgString(
"--device-linker=" + TC->getTripleString() + "=" + Arg));
+
+ // Forward the LTO mode relying on the Driver's parsing.
+ if (C.getDriver().getOffloadLTOMode() == LTOK_Full)
+ CmdArgs.push_back(Args.MakeArgString(
+ "--device-compiler=" + TC->getTripleString() + "=-flto=full"));
----------------
sarnex wrote:
it makes sense to me, `-foffload-lto` is to specify the device triple in
offloading targets, and `-flto` is for the main target
https://github.com/llvm/llvm-project/pull/126297
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits