https://github.com/DeanSturtevant1 updated 
https://github.com/llvm/llvm-project/pull/182130

>From af55c0105d58b74b0d424e9187d9613c78a5797f Mon Sep 17 00:00:00 2001
From: Dean Sturtevant <[email protected]>
Date: Wed, 18 Feb 2026 15:33:28 -0500
Subject: [PATCH 1/3] [SYCL][Driver] Fix #174877 test to be
 driver-path-agnostic.

---
 clang/test/Driver/sycl-offload-jit.cpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/clang/test/Driver/sycl-offload-jit.cpp 
b/clang/test/Driver/sycl-offload-jit.cpp
index 5bdb56d935a98..7e4a027fb8b73 100644
--- a/clang/test/Driver/sycl-offload-jit.cpp
+++ b/clang/test/Driver/sycl-offload-jit.cpp
@@ -31,11 +31,11 @@
 
 // Check if path to libsycl.so is passed to clang-linker-wrapper tool by 
default for SYCL compilation.
 // The test also checks if SYCL header include paths are added to the SYCL 
host and device compilation.
-// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fsycl %s 2>&1 \
-// RUN:   | FileCheck 
-check-prefixes=CHECK-LSYCL,CHECK-SYCL-HEADERS-HOST,CHECK-SYCL-HEADERS-DEVICE %s
-// CHECK-SYCL-HEADERS-DEVICE: "-fsycl-is-device"{{.*}} "-internal-isystem" 
"{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include"
-// CHECK-SYCL-HEADERS-HOST: "-fsycl-is-host"{{.*}} "-internal-isystem" 
"{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include"
-// CHECK-LSYCL: clang-linker-wrapper{{.*}} 
"{{.*}}bin{{[/\\]+}}..{{[/\\]+}}lib{{[/\\]+}}libsycl.so"
+// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fsycl %s 2>&1    \
+// RUN:   | FileCheck -DDRIVER_DIR=$(basename $(dirname %clang)) 
-check-prefixes=CHECK-LSYCL,CHECK-SYCL-HEADERS-HOST,CHECK-SYCL-HEADERS-DEVICE %s
+// CHECK-SYCL-HEADERS-DEVICE: "-fsycl-is-device"{{.*}} "-internal-isystem" 
"{{.*}}[[DRIVER_DIR]]{{[/\\]+}}..{{[/\\]+}}include"
+// CHECK-SYCL-HEADERS-HOST: "-fsycl-is-host"{{.*}} "-internal-isystem" 
"{{.*}}[[DRIVER_DIR]]{{[/\\]+}}..{{[/\\]+}}include"
+// CHECK-LSYCL: clang-linker-wrapper{{.*}} 
"{{.*}}[[DRIVER_DIR]]{{[/\\]+}}..{{[/\\]+}}lib{{[/\\]+}}libsycl.so"
 
 /// Check -fsycl-is-device is passed when compiling for the device.
 /// Check -fsycl-is-host is passed when compiling for host.

>From bb541d71b520af8ca4527cb7b206e9cfcb6c144a Mon Sep 17 00:00:00 2001
From: Dean Sturtevant <[email protected]>
Date: Wed, 18 Feb 2026 16:15:35 -0500
Subject: [PATCH 2/3] Quote a FileCheck argument.

---
 clang/test/Driver/sycl-offload-jit.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/test/Driver/sycl-offload-jit.cpp 
b/clang/test/Driver/sycl-offload-jit.cpp
index 7e4a027fb8b73..8be6d8c59488d 100644
--- a/clang/test/Driver/sycl-offload-jit.cpp
+++ b/clang/test/Driver/sycl-offload-jit.cpp
@@ -32,7 +32,7 @@
 // Check if path to libsycl.so is passed to clang-linker-wrapper tool by 
default for SYCL compilation.
 // The test also checks if SYCL header include paths are added to the SYCL 
host and device compilation.
 // RUN: %clang -### --target=x86_64-unknown-linux-gnu -fsycl %s 2>&1    \
-// RUN:   | FileCheck -DDRIVER_DIR=$(basename $(dirname %clang)) 
-check-prefixes=CHECK-LSYCL,CHECK-SYCL-HEADERS-HOST,CHECK-SYCL-HEADERS-DEVICE %s
+// RUN:   | FileCheck -DDRIVER_DIR="$(basename $(dirname %clang))" 
-check-prefixes=CHECK-LSYCL,CHECK-SYCL-HEADERS-HOST,CHECK-SYCL-HEADERS-DEVICE %s
 // CHECK-SYCL-HEADERS-DEVICE: "-fsycl-is-device"{{.*}} "-internal-isystem" 
"{{.*}}[[DRIVER_DIR]]{{[/\\]+}}..{{[/\\]+}}include"
 // CHECK-SYCL-HEADERS-HOST: "-fsycl-is-host"{{.*}} "-internal-isystem" 
"{{.*}}[[DRIVER_DIR]]{{[/\\]+}}..{{[/\\]+}}include"
 // CHECK-LSYCL: clang-linker-wrapper{{.*}} 
"{{.*}}[[DRIVER_DIR]]{{[/\\]+}}..{{[/\\]+}}lib{{[/\\]+}}libsycl.so"

>From bfeba946644e4e0149da4eea3b0cc8fe7fe1f852 Mon Sep 17 00:00:00 2001
From: Dean Sturtevant <[email protected]>
Date: Wed, 18 Feb 2026 17:08:24 -0500
Subject: [PATCH 3/3] Trying to use a DRIVER_DIR env variable.

---
 clang/test/Driver/sycl-offload-jit.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/clang/test/Driver/sycl-offload-jit.cpp 
b/clang/test/Driver/sycl-offload-jit.cpp
index 8be6d8c59488d..1fae9cc625754 100644
--- a/clang/test/Driver/sycl-offload-jit.cpp
+++ b/clang/test/Driver/sycl-offload-jit.cpp
@@ -31,8 +31,9 @@
 
 // Check if path to libsycl.so is passed to clang-linker-wrapper tool by 
default for SYCL compilation.
 // The test also checks if SYCL header include paths are added to the SYCL 
host and device compilation.
+// RUN: DRIVER_DIR=$(basename $(dirname %clang))
 // RUN: %clang -### --target=x86_64-unknown-linux-gnu -fsycl %s 2>&1    \
-// RUN:   | FileCheck -DDRIVER_DIR="$(basename $(dirname %clang))" 
-check-prefixes=CHECK-LSYCL,CHECK-SYCL-HEADERS-HOST,CHECK-SYCL-HEADERS-DEVICE %s
+// RUN:   | FileCheck -DDRIVER_DIR=${DRIVER_DIR} 
-check-prefixes=CHECK-LSYCL,CHECK-SYCL-HEADERS-HOST,CHECK-SYCL-HEADERS-DEVICE %s
 // CHECK-SYCL-HEADERS-DEVICE: "-fsycl-is-device"{{.*}} "-internal-isystem" 
"{{.*}}[[DRIVER_DIR]]{{[/\\]+}}..{{[/\\]+}}include"
 // CHECK-SYCL-HEADERS-HOST: "-fsycl-is-host"{{.*}} "-internal-isystem" 
"{{.*}}[[DRIVER_DIR]]{{[/\\]+}}..{{[/\\]+}}include"
 // CHECK-LSYCL: clang-linker-wrapper{{.*}} 
"{{.*}}[[DRIVER_DIR]]{{[/\\]+}}..{{[/\\]+}}lib{{[/\\]+}}libsycl.so"

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to