[clang] [llvm] [clang-linker-wrapper][SYCL] Support relocatable linking (PR #242098)

Yury Plyakhin via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 13 15:49:47 PST 2026


================
@@ -79,8 +79,10 @@ struct SYCLJITOptions {
 /// as global symbols and registers the images with the SYCL Runtime.
 /// \param Options Compiler and linker options to be encoded for the later
 ///  use by a runtime for JIT compilation. Not used for AOT.
-/// \param IsFinalizedImage True when \p Buffer holds an already finalized
-///  device image, which must not be device-linked again.
+/// \param IsFinalizedImage True when \p Buffer holds an already linked device
+///  image, e.g. from -fno-gpu-rdc or a relocatable link. It is put in
+///  .sycl_fatbin instead of .llvm.offloading, so that a later link does not
+///  link it again.
----------------
YuriPlyakhin wrote:

```suggestion
/// \param IsFinalizedImage True when \p Buffer holds a
///  device image that must not be device-linked again, e.g. from -fno-gpu-rdc or a relocatable link.
/// It is put in .sycl_fatbin instead of .llvm.offloading, so clang-linker-wrapper does not extract it for linking.
```

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


More information about the cfe-commits mailing list