Skip to content

Commit a8c8dc8

Browse files
authored
[Driver][NFC] Update test to use internal sysroot for device libs (#16350)
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 805754c commit a8c8dc8

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

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

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,27 @@
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 \
28-
// RUN: | FileCheck -check-prefixes=CHECK-NONPASSED %s
2929

3030
// CHECK-ITT-LINK-ONLY-NOT: "-fsycl-instrument-device-code"
3131
// CHECK-ITT-LINK-ONLY: llvm-link{{.*}} {{.*}}libsycl-itt-{{.*}}
3232

33-
// RUN: %clangxx -fsycl --no-offload-new-driver -fno-sycl-instrument-device-code -fsycl-targets=spir64 -### %s 2>&1 \
33+
// Verify that ITT annotations are not pulled in for non-SPIR-V targets as
34+
// well as when device code instrumentation is explicitly turned off.
35+
// RUN: %clangxx -fsycl --no-offload-new-driver --sysroot=%S/Inputs/SYCL \
36+
// RUN: -fsycl-targets=nvptx64-nvidia-cuda -nocudalib -### %s 2>&1 \
37+
// RUN: | FileCheck -check-prefixes=CHECK-NONPASSED %s
38+
// RUN: %clangxx -fsycl --no-offload-new-driver --sysroot=%S/Inputs/SYCL \
39+
// RUN: -fno-sycl-instrument-device-code -fsycl-targets=spir64 -### %s 2>&1 \
3440
// 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 \
41+
// RUN: %clangxx -fsycl --no-offload-new-driver --sysroot=%s/Inputs/SYCL \
42+
// RUN: -fsycl-targets=nvptx64-nvidia-cuda -fno-sycl-instrument-device-code \
43+
// RUN: -nocudalib -### %s 2>&1 \
3644
// RUN: | FileCheck -check-prefixes=CHECK-NONPASSED %s
3745

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

0 commit comments

Comments
 (0)