[clang] [SYCL][Driver] Pass -lsycl by default for SYCL compilation. (PR #174877)

Michael Toguchi via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 7 15:05:37 PST 2026


================
@@ -29,6 +29,11 @@
 // CHK-DEVICE-TRIPLE-SAME: "-O2"
 // CHK-DEVICE-TRIPLE: llvm-offload-binary{{.*}} "--image=file={{.*}}.bc,triple=spirv64-unknown-unknown,arch=generic,kind=sycl"
 
+// Check if -lsycl is passed to clang-linker-wrapper tool by default for SYCL compilation.
+// RUN: %clang -### -fsycl %s 2>&1 \
+// RUN:   | FileCheck -check-prefix=CHECK-LSYCL %s
+// CHECK-LSYCL: clang-linker-wrapper{{.*}} "-L/lib"{{.*}} "-lsycl"
----------------
mdtoguchi wrote:

AFAIK, the location of `libsycl` will be in the `lib` directory that is at the same level as `bin`.  The location associated with `-L` here should be that location.

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


More information about the cfe-commits mailing list