[clang] [Driver][SYCL] Add compile-time device library linking for SPIR-V targets (PR #196656)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 21 14:47:53 PDT 2026


================
@@ -93,6 +93,10 @@ def err_drv_hipspv_no_hip_path : Error<
   "'--hip-path' must be specified when offloading to SPIR-V unless '-nogpuinc' "
   "is given">;
 
+def err_drv_no_sycl_device_lib : Error<
+  "cannot find expected SYCL device library '%0'; pass '--no-offloadlib' to "
+  "build without the SYCL device libraries">;
+
----------------
jhuber6 wrote:

I would expect those SPIRV built files to be LLVM-IR. ELF-wrapped LTO is something for the offloading toolchains, but the device runtimes builds should just be `--target=spirv64--`. My guess is that your Intel triple does something weird there? You're probably mixing things that shouldn't be mixed. Doing `--target=spirv64-- -flto` yields LLVM-IR.

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


More information about the cfe-commits mailing list