Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion clang/test/Driver/sycl-device-lib-amdgcn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

// UNSUPPORTED: system-windows

// DEFINE: %{clang_install_dir} = %/S/Inputs/SYCL/bin

// Check that llvm-link uses the "-only-needed" flag.
// Not using the flag breaks kernel bundles.
// RUN: %clangxx -### -fsycl -fsycl-targets=amdgcn-amd-amdhsa -fno-sycl-libspirv --sysroot=%S/Inputs/SYCL \
// RUN: %clangxx -### -fsycl -fsycl-targets=amdgcn-amd-amdhsa -fno-sycl-libspirv -ccc-install-dir %{clang_install_dir} \
// RUN: -Xsycl-target-backend --offload-arch=gfx908 --rocm-path=%S/Inputs/rocm %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-ONLY-NEEDED %s

Expand Down
210 changes: 106 additions & 104 deletions clang/test/Driver/sycl-device-lib-bfloat16.cpp

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion clang/test/Driver/sycl-device-lib-diag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
// known environment that does not have the device libraries installed.
// UNSUPPORTED: libdevice

// DEFINE: %{clang_install_dir} = %/S/Inputs/SYCL/bin

/// Check for expected device library diagnostic.
// RUN: not %clangxx -fsycl --offload-new-driver %s -### 2>&1 \
// RUN: | FileCheck %s -check-prefix=SYCL-DEVICE-LIB-DIAG
// SYCL-DEVICE-LIB-DIAG: error: cannot find expected SYCL device library 'libsycl-crt.bc'. Pass '--no-offloadlib' to build without the SYCL device libraries

// RUN: %clangxx -fsycl --offload-new-driver %s --sysroot=%S/Inputs/SYCL -### 2>&1 \
// RUN: %clangxx -fsycl --offload-new-driver %s -ccc-install-dir %{clang_install_dir} -### 2>&1 \
// RUN: | FileCheck %s -check-prefix=SYCL-DEVICE-LIB-NO-DIAG
// SYCL-DEVICE-LIB-NO-DIAG-NOT: cannot find expected SYCL device library
4 changes: 3 additions & 1 deletion clang/test/Driver/sycl-device-lib-nvptx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

// UNSUPPORTED: system-windows

// DEFINE: %{clang_install_dir} = %/S/Inputs/SYCL/bin

// Check that llvm-link uses the "-only-needed" flag.
// Not using the flag breaks kernel bundles.
// RUN: %clangxx -### --cuda-path=%S/Inputs/CUDA/usr/local/cuda -fno-sycl-libspirv --sysroot=%S/Inputs/SYCL \
// RUN: %clangxx -### --cuda-path=%S/Inputs/CUDA/usr/local/cuda -fno-sycl-libspirv -ccc-install-dir %{clang_install_dir} \
// RUN: -fsycl -fsycl-targets=nvptx64-nvidia-cuda %s 2>&1 | FileCheck -check-prefix=CHK-ONLY-NEEDED %s

// CHK-ONLY-NEEDED: llvm-link"{{.*}}"--only-needed"{{.*}}"{{.*}}devicelib-nvptx64-nvidia-cuda.bc"{{.*}}
10 changes: 6 additions & 4 deletions clang/test/Driver/sycl-device-lib-win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
/// compiler-rt builtins library (libclang_rt.builtins.bc).
// DEFINE: %{resource_dir} = %/S/Inputs/SYCL/lib/clang/resource_dir

// DEFINE: %{clang_install_dir} = %/S/Inputs/SYCL/bin

/// ###########################################################################

/// test behavior of device library default link
// RUN: %clangxx -fsycl %s --sysroot=%S/Inputs/SYCL -resource-dir=%{resource_dir} -### 2>&1 \
// RUN: %clangxx -fsycl %s -ccc-install-dir %{clang_install_dir} -resource-dir=%{resource_dir} -### 2>&1 \
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_LINK_DEFAULT
// SYCL_DEVICE_LIB_LINK_DEFAULT: llvm-link{{.*}} "{{.*}}lib\\libsycl-crt.bc"
// SYCL_DEVICE_LIB_LINK_DEFAULT-SAME: "{{.*}}lib\\libsycl-cmath.bc"
Expand All @@ -21,17 +23,17 @@
/// ###########################################################################

/// test behavior of disabling all device libraries
// RUN: %clangxx -fsycl %s --no-offloadlib --sysroot=%S/Inputs/SYCL -### 2>&1 \
// RUN: %clangxx -fsycl %s --no-offloadlib -ccc-install-dir %{clang_install_dir} -### 2>&1 \
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_LINK_NO_DEVICE_LIB
// SYCL_DEVICE_LIB_LINK_NO_DEVICE_LIB: {{.*}}clang{{.*}} "-cc1" "-triple" "spir64-unknown-unknown"
// SYCL_DEVICE_LIB_LINK_NO_DEVICE_LIB-NOT: libsycl-cmath.bc

/// ###########################################################################

/// test llvm-link behavior for linking device libraries
// RUN: %clangxx -fsycl %s --sysroot=%S/Inputs/SYCL -resource-dir=%{resource_dir} -### 2>&1 \
// RUN: %clangxx -fsycl %s -ccc-install-dir %{clang_install_dir} -resource-dir=%{resource_dir} -### 2>&1 \
// RUN: | FileCheck %s -check-prefix=SYCL_LLVM_LINK_DEVICE_LIB
// RUN: %clangxx -fsycl -save-temps %s --sysroot=%S/Inputs/SYCL -resource-dir=%{resource_dir} -### 2>&1 \
// RUN: %clangxx -fsycl -save-temps %s -ccc-install-dir %{clang_install_dir} -resource-dir=%{resource_dir} -### 2>&1 \
// RUN: | FileCheck %s -check-prefix=SYCL_LLVM_LINK_DEVICE_LIB
// SYCL_LLVM_LINK_DEVICE_LIB: llvm-link{{.*}} "{{.*}}.bc" "-o" "{{.*}}.bc" "--suppress-warnings"
// SYCL_LLVM_LINK_DEVICE_LIB: llvm-link{{.*}} "--only-needed"
Expand Down
8 changes: 5 additions & 3 deletions clang/test/Driver/sycl-early-device-link-old-model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
// -c to create final device binaries during the link step when using -fsycl.
// Behavior is restricted to spir64_gen targets for now.

// DEFINE: %{clang_install_dir} = %/S/Inputs/SYCL/bin

// Create object that contains final device image
// RUN: %clangxx -c -fno-sycl-rdc -fsycl --no-offload-new-driver -fsycl-targets=spir64_gen \
// RUN: --target=x86_64-unknown-linux-gnu -Xsycl-target-backend \
// RUN: "-device skl" --sysroot=%S/Inputs/SYCL -### %s 2>&1 \
// RUN: "-device skl" -ccc-install-dir %{clang_install_dir} -### %s 2>&1 \
// RUN: | FileCheck %s -check-prefix=CREATE_IMAGE
// CREATE_IMAGE: clang{{.*}} "-triple" "spir64_gen-unknown-unknown"{{.*}} "-fsycl-is-device"{{.*}} "-o" "[[DEVICE_BC:.+\.bc]]"
// CREATE_IMAGE: llvm-link{{.*}} "-o" "[[LIB_DEVICE_BC:.+\.bc]]"
Expand All @@ -22,7 +24,7 @@

// RUN: %clangxx -c -fno-sycl-rdc -fsycl --no-offload-new-driver -fsycl-targets=spir64_gen \
// RUN: --target=x86_64-unknown-linux-gnu -Xsycl-target-backend \
// RUN: "-device skl" --sysroot=%S/Inputs/SYCL -ccc-print-phases %s \
// RUN: "-device skl" -ccc-install-dir %{clang_install_dir} -ccc-print-phases %s \
// RUN: -fsycl-instrument-device-code --no-offloadlib 2>&1 \
// RUN: | FileCheck %s -check-prefix=CREATE_IMAGE_PHASES
// CREATE_IMAGE_PHASES: 0: input, "[[INPUT:.+\.cpp]]", c++, (device-sycl)
Expand Down Expand Up @@ -68,7 +70,7 @@
// Mix and match JIT and AOT phases check. Expectation is for AOT to perform
// early device link, and JIT to just produce the LLVM-IR.
// RUN: %clangxx -c -fno-sycl-rdc -fsycl --no-offload-new-driver -fsycl-targets=spir64,spir64_gen \
// RUN: --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/SYCL \
// RUN: --target=x86_64-unknown-linux-gnu -ccc-install-dir %{clang_install_dir} \
// RUN: -Xsycl-target-backend=spir64_gen "-device skl" \
// RUN: -fsycl-instrument-device-code -ccc-print-phases %s --no-offloadlib 2>&1 \
// RUN: | FileCheck %s -check-prefix=JIT_AOT_PHASES
Expand Down
52 changes: 27 additions & 25 deletions clang/test/Driver/sycl-fsyclbin.cpp
Original file line number Diff line number Diff line change
@@ -1,54 +1,56 @@
/// Tests behaviors of -fsyclbin

// DEFINE: %{clang_install_dir} = %/S/Inputs/SYCL/bin

/// -fsyclbin is only used with the new offloading model.
// RUN: %clangxx -fsycl -fsyclbin --no-offload-new-driver %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=UNUSED
// UNUSED: warning: argument unused during compilation: '-fsyclbin'

/// -fsyclbin -fsycl-device-only usage. -fsycl-device-only will 'win' and
/// -fsyclbin is effectively ignored.
// RUN: %clangxx -fsycl-device-only -fsyclbin --offload-new-driver --sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: %clangxx -fsycl-device-only -fsyclbin --offload-new-driver -ccc-install-dir %{clang_install_dir} %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=SYCLBIN_UNUSED
// RUN: %clang_cl -fsycl-device-only -fsyclbin --offload-new-driver /clang:--sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: %clang_cl -fsycl-device-only -fsyclbin --offload-new-driver -ccc-install-dir %{clang_install_dir} %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=SYCLBIN_UNUSED
// SYCLBIN_UNUSED: warning: argument unused during compilation: '-fsyclbin'

/// Check tool invocation contents.
// RUN: %clangxx -fsycl -fsyclbin=input --offload-new-driver --sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: %clangxx -fsycl -fsyclbin=input --offload-new-driver -ccc-install-dir %{clang_install_dir} %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_TOOLS_INPUT
// RUN: %clangxx -fsyclbin=input --offload-new-driver --sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: %clangxx -fsyclbin=input --offload-new-driver -ccc-install-dir %{clang_install_dir} %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_TOOLS_INPUT
// RUN: %clang_cl -fsycl -fsyclbin=input --offload-new-driver /clang:--sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: %clang_cl -fsycl -fsyclbin=input --offload-new-driver -ccc-install-dir %{clang_install_dir} %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_TOOLS_INPUT
// CHECK_TOOLS_INPUT: llvm-offload-binary
// CHECK_TOOLS_INPUT-SAME: --image=file={{.*}}.bc,triple=spir64-unknown-unknown
// CHECK_TOOLS_INPUT-SAME: kind=sycl
// CHECK_TOOLS_INPUT: clang-linker-wrapper
// CHECK_TOOLS_INPUT-SAME: --syclbin=input

// RUN: %clangxx -fsycl -fsyclbin=object --offload-new-driver --sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: %clangxx -fsycl -fsyclbin=object --offload-new-driver -ccc-install-dir %{clang_install_dir} %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_TOOLS_OBJECT
// RUN: %clangxx -fsyclbin=object --offload-new-driver --sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: %clangxx -fsyclbin=object --offload-new-driver -ccc-install-dir %{clang_install_dir} %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_TOOLS_OBJECT
// RUN: %clang_cl -fsycl -fsyclbin=object --offload-new-driver /clang:--sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: %clang_cl -fsycl -fsyclbin=object --offload-new-driver -ccc-install-dir %{clang_install_dir} %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_TOOLS_OBJECT
// CHECK_TOOLS_OBJECT: llvm-offload-binary
// CHECK_TOOLS_OBJECT-SAME: --image=file={{.*}}.bc,triple=spir64-unknown-unknown
// CHECK_TOOLS_OBJECT-SAME: kind=sycl
// CHECK_TOOLS_OBJECT: clang-linker-wrapper
// CHECK_TOOLS_OBJECT-SAME: --syclbin=object

// RUN: %clangxx -fsycl -fsyclbin=executable --offload-new-driver --sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: %clangxx -fsycl -fsyclbin=executable --offload-new-driver -ccc-install-dir %{clang_install_dir} %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_TOOLS_EXECUTABLE
// RUN: %clangxx -fsyclbin=executable --offload-new-driver --sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: %clangxx -fsyclbin=executable --offload-new-driver -ccc-install-dir %{clang_install_dir} %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_TOOLS_EXECUTABLE
// RUN: %clang_cl -fsycl -fsyclbin=executable --offload-new-driver /clang:--sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: %clang_cl -fsycl -fsyclbin=executable --offload-new-driver -ccc-install-dir %{clang_install_dir} %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_TOOLS_EXECUTABLE
// RUN: %clangxx -fsycl -fsyclbin --offload-new-driver --sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: %clangxx -fsycl -fsyclbin --offload-new-driver -ccc-install-dir %{clang_install_dir} %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_TOOLS_EXECUTABLE
// RUN: %clangxx -fsyclbin --offload-new-driver --sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: %clangxx -fsyclbin --offload-new-driver -ccc-install-dir %{clang_install_dir} %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_TOOLS_EXECUTABLE
// RUN: %clang_cl -fsycl -fsyclbin --offload-new-driver /clang:--sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: %clang_cl -fsycl -fsyclbin --offload-new-driver -ccc-install-dir %{clang_install_dir} %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_TOOLS_EXECUTABLE
// CHECK_TOOLS_EXECUTABLE: llvm-offload-binary
// CHECK_TOOLS_EXECUTABLE-SAME: --image=file={{.*}}.bc,triple=spir64-unknown-unknown
Expand All @@ -74,36 +76,36 @@

/// Check the output file names (file.syclbin, or -o <file>)
// RUN: %clangxx --target=x86_64-unknown-linux-gnu -fsyclbin \
// RUN: --offload-new-driver --sysroot=%S/Inputs/SYCL -o file.syclbin %s -### 2>&1 \
// RUN: --offload-new-driver -ccc-install-dir %{clang_install_dir} -o file.syclbin %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_NAMED_OUTPUT
// CHECK_NAMED_OUTPUT: clang-linker-wrapper
// CHECK_NAMED_OUTPUT-SAME: "-o" "file.syclbin"

// RUN: %clang_cl -fsyclbin --offload-new-driver /clang:--sysroot=%S/Inputs/SYCL -o file.syclbin %s -### 2>&1 \
// RUN: %clang_cl -fsyclbin --offload-new-driver -ccc-install-dir %{clang_install_dir} -o file.syclbin %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_NAMED_OUTPUT_WIN
// CHECK_NAMED_OUTPUT_WIN: clang-linker-wrapper
// CHECK_NAMED_OUTPUT_WIN-SAME: "-out:file.syclbin"

/// For Linux - the default is 'a.out' so the syclbin file is 'a.syclbin'
// RUN: %clangxx --target=x86_64-unknown-linux-gnu -fsyclbin \
// RUN: --offload-new-driver --sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: --offload-new-driver -ccc-install-dir %{clang_install_dir} %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_LINUX_DEFAULT_OUTPUT
// CHECK_LINUX_DEFAULT_OUTPUT: clang-linker-wrapper
// CHECK_LINUX_DEFAULT_OUTPUT-SAME: "-o" "a.syclbin"

/// For Windows - the default is based on the source file so the syclbin file
/// is 'fsyclbin.syclbin'
// RUN: %clang_cl -fsyclbin --offload-new-driver /clang:--sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: %clang_cl -fsyclbin --offload-new-driver -ccc-install-dir %{clang_install_dir} %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_WIN_DEFAULT_OUTPUT
// CHECK_WIN_DEFAULT_OUTPUT: clang-linker-wrapper
// CHECK_WIN_DEFAULT_OUTPUT-SAME: "-out:{{.*}}fsyclbin.syclbin"

/// -fsyclbin=input and -fsyclbin=object imply
/// -fsycl-allow-device-image-dependencies, since cross-image symbol
/// resolution is required for those bundle states.
// RUN: %clangxx -fsyclbin=input --offload-new-driver --sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: %clangxx -fsyclbin=input --offload-new-driver -ccc-install-dir %{clang_install_dir} %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_DEPS_IMPLIED
// RUN: %clangxx -fsyclbin=object --offload-new-driver --sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: %clangxx -fsyclbin=object --offload-new-driver -ccc-install-dir %{clang_install_dir} %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_DEPS_IMPLIED
// CHECK_DEPS_IMPLIED: clang-linker-wrapper
// CHECK_DEPS_IMPLIED-SAME: "--sycl-post-link-options={{[^"]*}}-allow-device-image-dependencies{{[^"]*}}"
Expand All @@ -112,20 +114,20 @@
/// -fsyclbin=executable does not imply
/// -fsycl-allow-device-image-dependencies, since the resulting bundle
/// is fully linked and does not participate in cross-image link.
// RUN: %clangxx -fsyclbin=executable --offload-new-driver --sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: %clangxx -fsyclbin=executable --offload-new-driver -ccc-install-dir %{clang_install_dir} %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_DEPS_NOT_IMPLIED
// CHECK_DEPS_NOT_IMPLIED-NOT: -sycl-allow-device-image-dependencies

/// For AOT spir64_gen, -fsyclbin=input/object additionally implies
/// -library-compilation in the backend options so symbols stay
/// externally visible for runtime cross-image resolution.
// RUN: %clangxx -fsyclbin=object -fsycl-targets=intel_gpu_pvc \
// RUN: --offload-new-driver --sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: --offload-new-driver -ccc-install-dir %{clang_install_dir} %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_LIBCOMP_IMPLIED
// CHECK_LIBCOMP_IMPLIED: -library-compilation

// RUN: %clangxx -fsyclbin=executable -fsycl-targets=intel_gpu_pvc \
// RUN: --offload-new-driver --sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: --offload-new-driver -ccc-install-dir %{clang_install_dir} %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_LIBCOMP_NOT_IMPLIED
// CHECK_LIBCOMP_NOT_IMPLIED-NOT: -library-compilation

Expand All @@ -146,15 +148,15 @@
/// -fsycl-allow-device-image-dependencies is harmless but pointless,
/// so the driver emits a warning.
// RUN: %clangxx -fsyclbin=executable -fsycl-allow-device-image-dependencies \
// RUN: --offload-new-driver --sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: --offload-new-driver -ccc-install-dir %{clang_install_dir} %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_DEPS_REDUNDANT
// CHECK_DEPS_REDUNDANT: warning: '-fsycl-allow-device-image-dependencies' has no effect with '-fsyclbin=executable'

/// -fsycl-max-parallel-link-jobs is passed to clang-linker-wrapper when
/// building a SYCLBIN.
// RUN: %clangxx -fsyclbin=executable -fsycl-targets=intel_gpu_pvc \
// RUN: -fsycl-device-code-split=per_kernel -fsycl-max-parallel-link-jobs=24 \
// RUN: --offload-new-driver --sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: --offload-new-driver -ccc-install-dir %{clang_install_dir} %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_PARALLEL_JOBS
// CHECK_PARALLEL_JOBS-NOT: argument unused during compilation: '-fsycl-max-parallel-link-jobs=24'
// CHECK_PARALLEL_JOBS: clang-linker-wrapper{{.*}} "--syclbin=executable"
Expand Down
12 changes: 7 additions & 5 deletions clang/test/Driver/sycl-instrumentation-old-model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
// 1. A SPIR-V-based environment must be targetted
// 2. The option must not be explicitly disabled in the Driver call

// DEFINE: %{clang_install_dir} = %/S/Inputs/SYCL/bin

// FIXME: Force linux targets to allow for the libraries to be found. Dummy
// inputs for --sysroot should be updated to work better for Windows.

// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fsycl-instrument-device-code --sysroot=%S/Inputs/SYCL -fsycl-targets=spir64 -### %s 2>&1 \
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fsycl-instrument-device-code -ccc-install-dir %{clang_install_dir} -fsycl-targets=spir64 -### %s 2>&1 \
// RUN: | FileCheck -check-prefixes=CHECK-SPIRV,CHECK-HOST %s
// -fno-sycl-device-lib mustn't affect the linkage of ITT libraries
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fsycl-instrument-device-code --sysroot=%S/Inputs/SYCL --no-offloadlib -fsycl-targets=spir64 -### %s 2>&1 \
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fsycl-instrument-device-code -ccc-install-dir %{clang_install_dir} --no-offloadlib -fsycl-targets=spir64 -### %s 2>&1 \
// RUN: | FileCheck -check-prefixes=CHECK-SPIRV %s

// CHECK-SPIRV: "-cc1"{{.*}} "-fsycl-is-device"{{.*}} "-fsycl-instrument-device-code"
Expand All @@ -24,18 +26,18 @@
// offloading, we still link ITT annotations libraries to ensure ABI
// compatibility with previous release.
// RUN: %clangxx -fsycl --no-offload-new-driver -fsycl-targets=spir64 -### \
// RUN: --sysroot=%S/Inputs/SYCL %s 2>&1 \
// RUN: -ccc-install-dir %{clang_install_dir} %s 2>&1 \
// RUN: | FileCheck -check-prefixes=CHECK-ITT-LINK-ONLY %s

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

// Verify that ITT annotations are not pulled in for non-SPIR-V targets as
// well as when device code instrumentation is explicitly turned off.
// RUN: %clangxx -fsycl --no-offload-new-driver --sysroot=%S/Inputs/SYCL \
// RUN: %clangxx -fsycl --no-offload-new-driver -ccc-install-dir %{clang_install_dir} \
// RUN: -fsycl-targets=nvptx64-nvidia-cuda -fno-sycl-libspirv -nocudalib -### %s 2>&1 \
// RUN: | FileCheck -check-prefixes=CHECK-NONPASSED %s
// RUN: %clangxx -fsycl --no-offload-new-driver --sysroot=%S/Inputs/SYCL \
// RUN: %clangxx -fsycl --no-offload-new-driver -ccc-install-dir %{clang_install_dir} \
// RUN: -fno-sycl-instrument-device-code -fsycl-targets=spir64 -### %s 2>&1 \
// RUN: | FileCheck -check-prefixes=CHECK-NONPASSED %s
// RUN: %clangxx -fsycl --no-offload-new-driver --sysroot=%s/Inputs/SYCL \
Expand Down
Loading
Loading