Skip to content

Commit 3e43edc

Browse files
committed
[Driver][NFC] Update test to use internal sysroot for device libs
There is no guarantee that the device libraries are going to be built for a given built compiler. Use the internal sysroot setting to allow for proper inclusion of dependent device libraries for SYCL testing.
1 parent 3565b58 commit 3e43edc

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

clang/test/Driver/sycl-instrumentation-old-model.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,25 @@
2020
// CHECK-SPIRV-SAME: "{{.*}}libsycl-itt-stubs.bc"
2121
// CHECK-HOST-NOT: "-cc1"{{.*}} "-fsycl-is-host"{{.*}} "-fsycl-instrument-device-code"
2222

23-
// ITT annotations in device code are disabled by default. However, for SYCL offloading,
24-
// we still link ITT annotations libraries to ensure ABI compatibility with previous release.
25-
// RUN: %clangxx -fsycl --no-offload-new-driver -fsycl-targets=spir64 -### %s 2>&1 \
23+
// ITT annotations in device code are disabled by default. However, for SYCL
24+
// offloading, we still link ITT annotations libraries to ensure ABI
25+
// compatibility with previous release.
26+
// RUN: %clangxx -fsycl --no-offload-new-driver -fsycl-targets=spir64 -### \
27+
// RUN: --sysroot=%S/Inputs/SYCL %s 2>&1 \
2628
// RUN: | FileCheck -check-prefixes=CHECK-ITT-LINK-ONLY %s
27-
// RUN: %clangxx -fsycl --no-offload-new-driver -fsycl-targets=nvptx64-nvidia-cuda -nocudalib -### %s 2>&1 \
29+
// RUN: %clangxx -fsycl --no-offload-new-driver --sysroot=%S/Inputs/SYCL \
30+
// RUN: -fsycl-targets=nvptx64-nvidia-cuda -nocudalib -### %s 2>&1 \
2831
// RUN: | FileCheck -check-prefixes=CHECK-NONPASSED %s
2932

3033
// CHECK-ITT-LINK-ONLY-NOT: "-fsycl-instrument-device-code"
3134
// CHECK-ITT-LINK-ONLY: llvm-link{{.*}} {{.*}}libsycl-itt-{{.*}}
3235

33-
// RUN: %clangxx -fsycl --no-offload-new-driver -fno-sycl-instrument-device-code -fsycl-targets=spir64 -### %s 2>&1 \
36+
// RUN: %clangxx -fsycl --no-offload-new-driver --sysroot=%S/Inputs/SYCL \
37+
// RUN: -fno-sycl-instrument-device-code -fsycl-targets=spir64 -### %s 2>&1 \
3438
// RUN: | FileCheck -check-prefixes=CHECK-NONPASSED %s
35-
// RUN: %clangxx -fsycl --no-offload-new-driver -fsycl-targets=nvptx64-nvidia-cuda -fno-sycl-instrument-device-code -nocudalib -### %s 2>&1 \
39+
// RUN: %clangxx -fsycl --no-offload-new-driver --sysroot=%s/Inputs/SYCL \
40+
// RUN: -fsycl-targets=nvptx64-nvidia-cuda -fno-sycl-instrument-device-code \
41+
// RUN: -nocudalib -### %s 2>&1 \
3642
// RUN: | FileCheck -check-prefixes=CHECK-NONPASSED %s
3743

3844
// CHECK-NONPASSED-NOT: "-fsycl-instrument-device-code"

0 commit comments

Comments
 (0)