Skip to content
Open
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
2 changes: 1 addition & 1 deletion clang/test/Driver/sycl-offload-new-driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
// compilation options belong to the input images. Explicit linker options
// still reach clang-linker-wrapper for all three targets, with no extra
// JIT compiler or AOT backend options.
// RUN: %clangxx --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/SYCL \
// RUN: %clangxx --target=x86_64-unknown-linux-gnu \
// RUN: -fsycl --offload-new-driver -fsycl-targets=spir64,intel_gpu_pvc,spir64_x86_64 \
// RUN: -g0 -O2 -ftarget-register-alloc-mode=pvc:small \
// RUN: -Xsycl-target-linker=spir64 -jit-link-opt \
Expand Down
12 changes: 6 additions & 6 deletions clang/test/Driver/sycl-offload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -658,17 +658,17 @@

/// Passing in the default triple should allow for -Xsycl-target options, both the
/// "=<triple>" and the default spelling
// RUN: %clangxx -### -target x86_64-unknown-linux-gnu -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL -fsycl-targets=spir64 -Xsycl-target-backend=spir64 -DFOO -Xsycl-target-linker=spir64 -DFOO2 %S/Inputs/SYCL/objlin64.o 2>&1 \
// RUN: %clangxx -### -target x86_64-unknown-linux-gnu -fsycl --offload-new-driver -fsycl-targets=spir64 -Xsycl-target-backend=spir64 -DFOO -Xsycl-target-linker=spir64 -DFOO2 %S/Inputs/SYCL/objlin64.o 2>&1 \
// RUN: | FileCheck -check-prefixes=SYCL_TARGET_OPT %s
// RUN: %clangxx -### -target x86_64-unknown-linux-gnu -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL -Xsycl-target-backend=spir64 -DFOO -Xsycl-target-linker=spir64 -DFOO2 %S/Inputs/SYCL/objlin64.o 2>&1 \
// RUN: %clangxx -### -target x86_64-unknown-linux-gnu -fsycl --offload-new-driver -Xsycl-target-backend=spir64 -DFOO -Xsycl-target-linker=spir64 -DFOO2 %S/Inputs/SYCL/objlin64.o 2>&1 \
// RUN: | FileCheck -check-prefixes=SYCL_TARGET_OPT %s
// SYCL_TARGET_OPT: clang-linker-wrapper{{.*}} "--device-compiler=sycl:spir64-unknown-unknown=--jit-compiler-options=-DFOO" "--device-linker=sycl:spir64-unknown-unknown=--jit-linker-options=-DFOO2"

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

// RUN: %clangxx -### -target x86_64-unknown-linux-gnu -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL -fsycl-targets=spir64_x86_64 -Xsycl-target-backend -DFOO %S/Inputs/SYCL/objlin64.o 2>&1 \
// RUN: %clangxx -### -target x86_64-unknown-linux-gnu -fsycl --offload-new-driver -fsycl-targets=spir64_x86_64 -Xsycl-target-backend -DFOO %S/Inputs/SYCL/objlin64.o 2>&1 \
// RUN: | FileCheck -check-prefixes=SYCL_TARGET_OPT_AOT,SYCL_TARGET_OPT_CPU %s
// RUN: %clangxx -### -target x86_64-unknown-linux-gnu -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL -fsycl-targets=spir64_gen -Xsycl-target-backend -DFOO %S/Inputs/SYCL/objlin64.o 2>&1 \
// RUN: %clangxx -### -target x86_64-unknown-linux-gnu -fsycl --offload-new-driver -fsycl-targets=spir64_gen -Xsycl-target-backend -DFOO %S/Inputs/SYCL/objlin64.o 2>&1 \
// RUN: | FileCheck -check-prefixes=SYCL_TARGET_OPT_AOT,SYCL_TARGET_OPT_GPU %s
// SYCL_TARGET_OPT_AOT-NOT: error: cannot deduce implicit triple value for '-Xsycl-target-backend'
// SYCL_TARGET_OPT_CPU: clang-linker-wrapper{{.*}} "--device-linker=sycl:spir64_x86_64-unknown-unknown=--opencl-aot-options=-DFOO"
Expand All @@ -684,10 +684,10 @@

/// Using linker specific items at the end of the command should not fail when
/// we are performing a non-linking compilation behavior
// RUN: %clangxx -E -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL %S/Inputs/SYCL/liblin64.a \
// RUN: %clangxx -E -fsycl --offload-new-driver %S/Inputs/SYCL/liblin64.a \
// RUN: -target x86_64-unknown-linux-gnu -### 2>&1 \
// RUN: | FileCheck -check-prefix IGNORE_INPUT %s
// RUN: %clangxx -c -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL %S/Inputs/SYCL/liblin64.a \
// RUN: %clangxx -c -fsycl --offload-new-driver %S/Inputs/SYCL/liblin64.a \
// RUN: -target x86_64-unknown-linux-gnu -### 2>&1 \
// RUN: | FileCheck -check-prefix IGNORE_INPUT %s
// IGNORE_INPUT: input unused
Expand Down
16 changes: 8 additions & 8 deletions clang/test/Driver/sycl-option-ownership.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
// Object-only policy: compiler-owned flags do not alter input options.
// As with CUDA/HIP, compiler-only options are accepted silently at link time.
// BuildActions claims these options even though the linker wrapper drops them.
// RUN: %clangxx --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/SYCL \
// RUN: %clangxx --target=x86_64-unknown-linux-gnu \
// RUN: --offload-new-driver -fsycl -fsycl-targets=spir64 \
// RUN: -Werror=unused-command-line-argument \
// RUN: -g -O0 -ftarget-register-alloc-mode=pvc:large \
Expand All @@ -38,7 +38,7 @@
// RUN: --implicit-check-not=unused-command-line-argument

// Multiple SPIR targets follow the same silent-acceptance policy.
// RUN: %clangxx --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/SYCL \
// RUN: %clangxx --target=x86_64-unknown-linux-gnu \
// RUN: --offload-new-driver -fsycl -fsycl-targets=spir64,spir64_gen,spir64_x86_64 \
// RUN: -Werror=unused-command-line-argument \
// RUN: -ftarget-register-alloc-mode=pvc:large \
Expand All @@ -48,7 +48,7 @@

// -O still controls host LTO and SYCL post-link optimization. Plain -g is
// accepted by the host linker driver; neither option should be warned about.
// RUN: %clangxx --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/SYCL \
// RUN: %clangxx --target=x86_64-unknown-linux-gnu \
// RUN: --offload-new-driver -fsycl -fsycl-targets=spir64 \
// RUN: -g -O3 -flto=thin -### %S/Inputs/SYCL/objlin64.o 2>&1 \
// RUN: | FileCheck %s --check-prefix=HOST_LTO \
Expand All @@ -59,7 +59,7 @@

// Link orchestration must not interpret or validate compiler-only settings,
// or warn about their unused values.
// RUN: %clangxx --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/SYCL \
// RUN: %clangxx --target=x86_64-unknown-linux-gnu \
// RUN: --offload-new-driver -fsycl -fsycl-targets=spir64 \
// RUN: -Werror=unused-command-line-argument \
// RUN: -ftarget-register-alloc-mode=pvc:invalid \
Expand All @@ -81,7 +81,7 @@
// RUN: %clangxx --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/SYCL \
// RUN: --offload-new-driver -fsycl -fsycl-targets=spir64 \
// RUN: -### %s 2>&1 | FileCheck %s --check-prefix=LINK
// RUN: %clangxx --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/SYCL \
// RUN: %clangxx --target=x86_64-unknown-linux-gnu \
// RUN: --offload-new-driver -fsycl -fsycl-targets=spir64 \
// RUN: -### %S/Inputs/SYCL/objlin64.o 2>&1 | FileCheck %s --check-prefix=LINK

Expand All @@ -104,7 +104,7 @@
// AOT-NOT: --ocloc-options=

// Explicit backend and linker options remain distinct on object-only links.
// RUN: %clangxx --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/SYCL \
// RUN: %clangxx --target=x86_64-unknown-linux-gnu \
// RUN: --offload-new-driver -fsycl -fsycl-targets=spir64 \
// RUN: -Xsycl-target-backend -backend-opt -Xsycl-target-linker -link-opt \
// RUN: -### %S/Inputs/SYCL/objlin64.o 2>&1 \
Expand All @@ -124,15 +124,15 @@
// EXPORT-NOT: -library-compilation

// Link-only SYCLBIN settings retain their full-context implications.
// RUN: %clangxx --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/SYCL \
// RUN: %clangxx --target=x86_64-unknown-linux-gnu \
// RUN: --offload-new-driver -fsycl -fsycl-targets=spir64_gen -fsyclbin=object \
// RUN: -### %S/Inputs/SYCL/objlin64.o 2>&1 \
// RUN: | FileCheck %s --check-prefix=SYCLBIN
// SYCLBIN: clang-linker-wrapper{{.*}}--ocloc-options=-options
// SYCLBIN-SAME: --ocloc-options=-library-compilation

// An explicit opt-out wins over the SYCLBIN implication.
// RUN: %clangxx --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/SYCL \
// RUN: %clangxx --target=x86_64-unknown-linux-gnu \
// RUN: --offload-new-driver -fsycl -fsycl-targets=spir64_gen -fsyclbin=object \
// RUN: -fno-target-export-symbols -### %S/Inputs/SYCL/objlin64.o 2>&1 \
// RUN: | FileCheck %s --check-prefix=NOEXPORT
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Driver/sycl-spirv-obj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@

/// Use of -fsycl-device-obj=spirv should not be effective during linking
// RUN: touch %t.o
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL -fsycl-device-obj=spirv -### %t.o 2>&1 | \
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl --offload-new-driver -fsycl-device-obj=spirv -### %t.o 2>&1 | \
// RUN: FileCheck %s -check-prefixes=LLVM_SPIRV_R
// LLVM_SPIRV_R: clang-linker-wrapper{{.*}}
Loading