================
@@ -589,6 +595,10 @@ Expected<StringRef> clang(ArrayRef<StringRef> InputFiles,
const ArgList &Args,
if (ActiveOffloadKindMask & OFK_SYCL)
CmdArgs.push_back("--sycl-link");
+ // Pass the real devices on to clang-sycl-linker.
+ for (const std::string &Device : Devices)
+ CmdArgs.append({"-Xlinker", Args.MakeArgString("--code=" + Device)});
+
----------------
YuriPlyakhin wrote:
this code is not limited to clang-sycl-linker now, while comments says so.
But I think today it should be tool-specific, since not all device linkers
might accept this option, so maybe this code should be placed under `if` above
`if (ActiveOffloadKindMask & OFK_SYCL)`
@sarnex , what do you think?
https://github.com/llvm/llvm-project/pull/239010
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits