[clang] [llvm] [clang][SYCL] Embed finalized device images for -foffload-include-binary (PR #216419)

Yury Plyakhin via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 11:19:02 PDT 2026


================
@@ -1182,6 +1182,10 @@ void CodeGenModule::Release() {
   });
   EmitCtorList(GlobalCtors, "llvm.global_ctors");
   EmitCtorList(GlobalDtors, "llvm.global_dtors");
+  // The SYCL image registration functions are added to the constructor and
+  // destructor lists which merge into llvm.global_ctors and llvm.global_dtors.
+  if (LangOpts.SYCLIsHost && !CodeGenOpts.OffloadBinaryToEmbedFile.empty())
+    embedSYCLTargetBinary();
----------------
YuriPlyakhin wrote:

0e88bd2e84c1477dec1fb967076cfd0e2b18a63a

https://github.com/llvm/llvm-project/pull/216419


More information about the llvm-commits mailing list