From aef58ce9ae09fc3a8c20e5409a0b1de3203ca00d Mon Sep 17 00:00:00 2001 From: Jinsong Ji Date: Sun, 13 Aug 2023 09:24:00 -0700 Subject: [PATCH] Fix Driver test due to return code change --- .../sycl-device-lib-opaque-pointers.cpp | 2 +- clang/test/Driver/sycl-libspirv-invalid.cpp | 8 +- .../Driver/sycl-no-bundle-offload-arch.cpp | 4 +- .../Driver/sycl-nvptx-native-half-ty-opt.cpp | 8 +- clang/test/Driver/sycl-nvptx-sqrt.cpp | 4 +- clang/test/Driver/sycl-offload-amdgcn.cpp | 8 +- .../test/Driver/sycl-offload-static-lib-2.cpp | 22 ++--- clang/test/Driver/sycl-offload-with-split.c | 2 +- clang/test/Driver/sycl-oneapi-gpu.cpp | 80 +++++++++---------- clang/test/Driver/sycl-target-mismatch.cpp | 30 +++---- clang/test/Driver/sycl-triple-dae-flags.cpp | 4 +- 11 files changed, 86 insertions(+), 86 deletions(-) diff --git a/clang/test/Driver/sycl-device-lib-opaque-pointers.cpp b/clang/test/Driver/sycl-device-lib-opaque-pointers.cpp index b4a0638f385a4..bada330f181b9 100644 --- a/clang/test/Driver/sycl-device-lib-opaque-pointers.cpp +++ b/clang/test/Driver/sycl-device-lib-opaque-pointers.cpp @@ -9,7 +9,7 @@ /// ########################################################################### -// RUN: not %clangxx -fsycl -fsycl-targets=nvptx64-nvidia-cuda %s --sysroot=%S/Inputs/SYCL -### 2>&1 \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda %s --sysroot=%S/Inputs/SYCL -### 2>&1 \ // RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_OPAQUE_NON_SPIRV // RUN: %clangxx -fsycl %s --sysroot=%S/Inputs/SYCL -### 2>&1 \ // RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_OPAQUE_SPIRV diff --git a/clang/test/Driver/sycl-libspirv-invalid.cpp b/clang/test/Driver/sycl-libspirv-invalid.cpp index a2994ae38b4b5..cd56a66e440a3 100644 --- a/clang/test/Driver/sycl-libspirv-invalid.cpp +++ b/clang/test/Driver/sycl-libspirv-invalid.cpp @@ -1,21 +1,21 @@ /// Test that `-fsycl-libspirv-path=` produces a diagnostic when the library is not found. // UNSUPPORTED: system-windows -// RUN: not %clangxx -### -std=c++11 -target x86_64-unknown-linux-gnu -fsycl \ +// RUN: not %clangxx -### -std=c++11 -target x86_64-unknown-linux-gnu -fsycl -nocudalib \ // RUN: -fsycl-targets=nvptx64-nvidia-cuda --cuda-path=%S/Inputs/CUDA/usr/local/cuda \ // RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/no-libspirv-exists-here.bc %s 2>&1 \ // RUN: | FileCheck --check-prefix=ERR-CUDA %s // ERR-CUDA: cannot find 'remangled-l64-signed_char.libspirv-nvptx64-nvidia-cuda.bc'; // ERR-CUDA-SAME: provide path to libspirv library via '-fsycl-libspirv-path', or pass '-fno-sycl-libspirv' to build without linking with libspirv -// RUN: not %clangxx -### -std=c++11 -target x86_64-unknown-windows-msvc -fsycl \ +// RUN: not %clangxx -### -std=c++11 -target x86_64-unknown-windows-msvc -fsycl -nocudalib \ // RUN: -fsycl-targets=nvptx64-nvidia-cuda --cuda-path=%S/Inputs/CUDA/usr/local/cuda \ // RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/no-libspirv-exists-here.bc %s 2>&1 \ // RUN: | FileCheck --check-prefix=ERR-CUDA-WIN %s // ERR-CUDA-WIN: cannot find 'remangled-l32-signed_char.libspirv-nvptx64-nvidia-cuda.bc'; // ERR-CUDA-WIN-SAME: provide path to libspirv library via '-fsycl-libspirv-path', or pass '-fno-sycl-libspirv' to build without linking with libspirv -// RUN: not %clangxx -### -std=c++11 -target x86_64-unknown-linux-gnu -fsycl \ +// RUN: not %clangxx -### -std=c++11 -target x86_64-unknown-linux-gnu -fsycl -nogpulib \ // RUN: -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx908 \ // RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/no-libspirv-exists-here.bc %s 2>&1 \ // RUN: | FileCheck --check-prefix=ERR-HIP %s @@ -28,7 +28,7 @@ // RUN: | FileCheck --check-prefix=OK-CUDA %s // OK-CUDA-NOT: cannot find suitable 'remangled-l64-signed_char.libspirv-nvptx64-nvidia-cuda.bc' -// RUN: not %clangxx -### -std=c++11 -target x86_64-unknown-linux-gnu -fsycl \ +// RUN: %clangxx -### -std=c++11 -target x86_64-unknown-linux-gnu -fsycl -nogpulib \ // RUN: -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx908 \ // RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/no-libspirv-exists-here.bc -fno-sycl-libspirv %s 2>&1 \ // RUN: | FileCheck --check-prefix=OK-HIP %s diff --git a/clang/test/Driver/sycl-no-bundle-offload-arch.cpp b/clang/test/Driver/sycl-no-bundle-offload-arch.cpp index fe4331a53a979..03d79da9265bf 100644 --- a/clang/test/Driver/sycl-no-bundle-offload-arch.cpp +++ b/clang/test/Driver/sycl-no-bundle-offload-arch.cpp @@ -1,10 +1,10 @@ -// RUN: not %clangxx -### -fsycl -fsycl-targets=nvptx64-nvidia-cuda \ +// RUN: %clangxx -### -fsycl -fsycl-targets=nvptx64-nvidia-cuda -nocudalib\ // RUN: -fno-bundle-offload-arch -c %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-BUNDLE-TAG-OBJ %s // // CHK-BUNDLE-TAG-OBJ-NOT: clang-offload-bundler{{.*}}-targets=sycl-nvptx64-nvidia-cuda-sm_" -// RUN: not %clangxx -### -fsycl -fsycl-targets=nvptx64-nvidia-cuda \ +// RUN: %clangxx -### -fsycl -fsycl-targets=nvptx64-nvidia-cuda -nocudalib\ // RUN: -fno-bundle-offload-arch %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-BUNDLE-TAG %s // diff --git a/clang/test/Driver/sycl-nvptx-native-half-ty-opt.cpp b/clang/test/Driver/sycl-nvptx-native-half-ty-opt.cpp index 8b1fa7de558bc..a83fdbc70fa08 100644 --- a/clang/test/Driver/sycl-nvptx-native-half-ty-opt.cpp +++ b/clang/test/Driver/sycl-nvptx-native-half-ty-opt.cpp @@ -1,18 +1,18 @@ /// Check that -fnative-half-type is added automatically for SM versions /// greater or equal to 53. -// RUN: not %clangxx -fsycl -fsycl-targets=nvidia_gpu_sm_53 %s -### 2>&1 | \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_53 %s -### 2>&1 | \ // RUN: FileCheck --check-prefix=CHECK-53 %s // CHECK-53: clang{{.*}} "-triple" "nvptx64-nvidia-cuda"{{.*}}"-fnative-half-type" -// RUN: not %clangxx -fsycl -fsycl-targets=nvidia_gpu_sm_70 %s -### 2>&1 | \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_70 %s -### 2>&1 | \ // RUN: FileCheck --check-prefix=CHECK-70 %s // CHECK-70: clang{{.*}} "-triple" "nvptx64-nvidia-cuda"{{.*}}"-fnative-half-type" /// As the default is set to SM_50, make sure that the option is not added. -// RUN: not %clangxx -fsycl -fsycl -fsycl-targets=nvidia64-nvidia-cuda %s -### 2>&1 | \ +// RUN: not %clangxx -fsycl -nocudalib -fsycl -fsycl-targets=nvidia64-nvidia-cuda %s -### 2>&1 | \ // RUN: FileCheck --check-prefix=CHECK-DEFAULT %s // CHECK-DEFAULT-NOT: {{.*}}"-fnative-half-type" /// SM < 53 -// RUN: not %clangxx -fsycl -fsycl-targets=nvidia_gpu_sm_50 %s -### 2>&1 | \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_50 %s -### 2>&1 | \ // RUN: FileCheck --check-prefix=CHECK-50 %s // CHECK-50-NOT: {{.*}}"-fnative-half-type" diff --git a/clang/test/Driver/sycl-nvptx-sqrt.cpp b/clang/test/Driver/sycl-nvptx-sqrt.cpp index 382b57b94d902..a08a7bad782ba 100644 --- a/clang/test/Driver/sycl-nvptx-sqrt.cpp +++ b/clang/test/Driver/sycl-nvptx-sqrt.cpp @@ -1,6 +1,6 @@ // REQUIRES: nvptx-registered-target -// RUN: not %clang -### \ +// RUN: %clang -### -nocudalib \ // RUN: -fsycl -fsycl-targets=nvptx64-nvidia-cuda \ // RUN: -fsycl-fp32-prec-sqrt \ // RUN: %s \ @@ -8,7 +8,7 @@ // CHECK-CORRECT: "-fcuda-prec-sqrt" -// RUN: not %clang -### \ +// RUN: %clang -### -nocudalib \ // RUN: -fsycl -fsycl-targets=nvptx64-nvidia-cuda \ // RUN: %s \ // RUN: 2>&1 | FileCheck --check-prefix=CHECK-APPROX %s diff --git a/clang/test/Driver/sycl-offload-amdgcn.cpp b/clang/test/Driver/sycl-offload-amdgcn.cpp index 12cb82839d124..ececd41c3b680 100644 --- a/clang/test/Driver/sycl-offload-amdgcn.cpp +++ b/clang/test/Driver/sycl-offload-amdgcn.cpp @@ -9,8 +9,8 @@ // CHK-ARCH: error: missing AMDGPU architecture for SYCL offloading; specify it with '-Xsycl-target-backend --offload-arch' /// Check action graph. -// RUN: not %clangxx -### -std=c++11 -target x86_64-unknown-linux-gnu -fsycl \ -// RUN: -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 \ +// RUN: %clangxx -### -std=c++11 -target x86_64-unknown-linux-gnu -fsycl \ +// RUN: -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 -nogpulib\ // RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/libspirv.bc %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-ACTIONS %s // CHK-ACTIONS: "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu"{{.*}} "-fsycl-is-device"{{.*}} "-Wno-sycl-strict"{{.*}} "-sycl-std=2020" {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libspirv.bc"{{.*}} "-target-cpu" "gfx906"{{.*}} "-std=c++11"{{.*}} @@ -45,11 +45,11 @@ // CHK-PHASES-NO-CC: 21: offload, "host-sycl (x86_64-unknown-linux-gnu)" {10}, "device-sycl (amdgcn-amd-amdhsa:gfx906)" {20}, image /// Check that we only unbundle an archive once. -// RUN: not %clangxx -### -target x86_64-unknown-linux-gnu -fsycl \ +// RUN: %clangxx -### -target x86_64-unknown-linux-gnu -fsycl -nogpulib \ // RUN: -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend \ // RUN: --offload-arch=gfx906 %s -L%S/Inputs/SYCL -llin64 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-ARCHIVE %s -// RUN: not %clangxx -### -target x86_64-unknown-linux-gnu -fsycl \ +// RUN: %clangxx -### -target x86_64-unknown-linux-gnu -fsycl -nogpulib \ // RUN: -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend \ // RUN: --offload-arch=gfx906 %s %S/Inputs/SYCL/liblin64.a 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-ARCHIVE %s diff --git a/clang/test/Driver/sycl-offload-static-lib-2.cpp b/clang/test/Driver/sycl-offload-static-lib-2.cpp index 32c49dadf2aa4..08e1a40ce24ae 100644 --- a/clang/test/Driver/sycl-offload-static-lib-2.cpp +++ b/clang/test/Driver/sycl-offload-static-lib-2.cpp @@ -20,9 +20,9 @@ // RUN: | FileCheck %s -check-prefixes=STATIC_LIB,STATIC_LIB_DEF -DBUNDLE_TRIPLE=sycl-spir64-unknown-unknown // RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -L/dummy/dir %t_lib.lo -### %t_obj.o 2>&1 \ // RUN: | FileCheck %s -check-prefixes=STATIC_LIB,STATIC_LIB_DEF -DBUNDLE_TRIPLE=sycl-spir64-unknown-unknown -// RUN: not %clangxx -target x86_64-unknown-linux-gnu -fsycl -fsycl-targets=nvptx64-nvidia-cuda -L/dummy/dir %t_lib.a -### %t_obj.o 2>&1 \ +// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -L/dummy/dir %t_lib.a -### %t_obj.o 2>&1 \ // RUN: | FileCheck %s -check-prefixes=STATIC_LIB_NVPTX -DBUNDLE_TRIPLE=sycl-nvptx64-nvidia-cuda-sm_50 -// RUN: not %clangxx -target x86_64-unknown-linux-gnu -fsycl -fsycl-targets=nvptx64-nvidia-cuda -L/dummy/dir %t_lib.lo -### %t_obj.o 2>&1 \ +// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -L/dummy/dir %t_lib.lo -### %t_obj.o 2>&1 \ // RUN: | FileCheck %s -check-prefixes=STATIC_LIB_NVPTX -DBUNDLE_TRIPLE=sycl-nvptx64-nvidia-cuda-sm_50 // STATIC_LIB: clang-offload-bundler{{.*}} "-type=o" "-targets={{.*}},[[BUNDLE_TRIPLE]]" "-input=[[INPUTO:.+\.o]]" "-output=[[HOSTOBJ:.+\.o]]" "-output={{.+\.o}}" // STATIC_LIB: clang-offload-deps{{.*}} "-targets=[[BUNDLE_TRIPLE]]" @@ -42,7 +42,7 @@ // RUN: | FileCheck %s -check-prefixes=STATIC_L_LIB,STATIC_L_LIB_DEF -DBUNDLE_TRIPLE=sycl-spir64-unknown-unknown // RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -Xlinker -Bstatic -L%t_dir -L%S/Inputs/SYCL -llin64 -### %t_obj.o 2>&1 \ // RUN: | FileCheck %s -check-prefixes=STATIC_L_LIB,STATIC_L_LIB_DEF -DBUNDLE_TRIPLE=sycl-spir64-unknown-unknown -// RUN: not %clangxx -target x86_64-unknown-linux-gnu -fsycl -fsycl-targets=nvptx64-nvidia-cuda -L%S/Inputs/SYCL -llin64 -### %t_obj.o 2>&1 \ +// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -L%S/Inputs/SYCL -llin64 -### %t_obj.o 2>&1 \ // RUN: | FileCheck %s -check-prefixes=STATIC_L_LIB_NVPTX -DBUNDLE_TRIPLE=sycl-nvptx64-nvidia-cuda-sm_50 // STATIC_L_LIB: clang-offload-bundler{{.*}} "-type=o" "-targets={{.*}},[[BUNDLE_TRIPLE]]" "-input=[[INPUTO:.+\.o]]" "-output=[[HOSTOBJ:.+\.o]]" "-output={{.+\.o}}" // STATIC_L_LIB: clang-offload-deps{{.*}} "-targets=[[BUNDLE_TRIPLE]]" @@ -70,7 +70,7 @@ // RUN: touch %t-3.o // RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl %t_lib.a -### %t-1.o %t-2.o %t-3.o 2>&1 \ // RUN: | FileCheck %s -check-prefixes=STATIC_LIB_MULTI_O,STATIC_LIB_MULTI_O_DEF -DBUNDLE_TRIPLE=sycl-spir64-unknown-unknown -// RUN: not %clangxx -target x86_64-unknown-linux-gnu -fsycl -fsycl-targets=nvptx64-nvidia-cuda %t_lib.a -### %t-1.o %t-2.o %t-3.o 2>&1 \ +// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda %t_lib.a -### %t-1.o %t-2.o %t-3.o 2>&1 \ // RUN: | FileCheck %s -check-prefixes=STATIC_LIB_MULTI_O,STATIC_LIB_MULTI_O_NVPTX -DBUNDLE_TRIPLE=sycl-nvptx64-nvidia-cuda-sm_50 // STATIC_LIB_MULTI_O: clang-offload-bundler{{.*}} "-type=o" "-targets={{.*}},[[BUNDLE_TRIPLE]]" "-input={{.+}}-1.o" // STATIC_LIB_MULTI_O: clang-offload-bundler{{.*}} "-type=o" "-targets={{.*}},[[BUNDLE_TRIPLE]]" "-input={{.+}}-2.o" @@ -147,7 +147,7 @@ // RUN: touch %t_lib.a // RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl %t_lib.a -o output_name -lOpenCL -### %s 2>&1 \ // RUN: | FileCheck %s -check-prefix=STATIC_LIB_SRC2 -DBUNDLE_TRIPLE=sycl-spir64-unknown-unknown -DDEPS_TRIPLE=sycl-spir64-unknown-unknown -// RUN: not %clangxx -target x86_64-unknown-linux-gnu -fsycl -fsycl-targets=nvptx64-nvidia-cuda %t_lib.a -o output_name -lOpenCL -### %s 2>&1 \ +// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda %t_lib.a -o output_name -lOpenCL -### %s 2>&1 \ // RUN: | FileCheck %s -check-prefix=STATIC_LIB_SRC2 -DBUNDLE_TRIPLE=sycl-nvptx64-nvidia-cuda-sm_50 -DDEPS_TRIPLE=sycl-nvptx64-nvidia-cuda-sm_50 // STATIC_LIB_SRC2: clang{{.*}} "-emit-obj" {{.*}} "-o" "[[HOSTOBJ:.+\.o]]" // STATIC_LIB_SRC2: ld{{(.exe)?}}" {{.*}} "-o" "[[HOSTEXE:.+\.out]]" {{.*}}"--unresolved-symbols=ignore-all" @@ -165,7 +165,7 @@ // RUN: touch %t_lib.a // RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl %t_lib.a -o output_name -lstdc++ -z relro -### %s 2>&1 \ // RUN: | FileCheck %s -check-prefix=STATIC_LIB_SRC3 -DBUNDLE_TRIPLE=sycl-spir64-unknown-unknown -// RUN: not %clangxx -target x86_64-unknown-linux-gnu -fsycl -fsycl-targets=nvptx64-nvidia-cuda %t_lib.a -o output_name -lstdc++ -z relro -### %s 2>&1 \ +// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda %t_lib.a -o output_name -lstdc++ -z relro -### %s 2>&1 \ // RUN: | FileCheck %s -check-prefix=STATIC_LIB_SRC3 -DBUNDLE_TRIPLE=sycl-nvptx64-nvidia-cuda-sm_50 // STATIC_LIB_SRC3: clang-offload-bundler{{.*}} "-type=a{{(oo)*}}" "-targets=[[BUNDLE_TRIPLE]]" // STATIC_LIB_SRC3: llvm-link{{.*}} "{{.*}}" @@ -173,7 +173,7 @@ /// Test device linking behaviors with spir64 and nvptx targets // RUN: touch %t_lib.a -// RUN: not %clangxx -target x86_64-unknown-linux-gnu -fsycl -fsycl-targets=nvptx64-nvidia-cuda,spir64 %t_lib.a -### %s 2>&1 \ +// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda,spir64 %t_lib.a -### %s 2>&1 \ // RUN: | FileCheck %s -check-prefix=STATIC_LIB_MIX -DBUNDLE_TRIPLE=sycl-nvptx64-nvidia-cuda-sm_50 // STATIC_LIB_MIX: clang-offload-bundler{{.*}} "-type=aoo" "-targets=sycl-nvptx64-nvidia-cuda-sm_50,sycl-spir64-unknown-unknown" {{.*}} "-output=[[NVPTXLIST:.+\.txt]]" "-output=[[SYCLLIST:.+\.txt]]" // STATIC_LIB_MIX: llvm-link{{.*}} "@[[NVPTXLIST]]" @@ -192,9 +192,9 @@ // RUN: | FileCheck %s -check-prefixes=WHOLE_STATIC_LIB,WHOLE_STATIC_LIB_1,WHOLE_STATIC_LIB_DEF -DBUNDLE_TRIPLE=sycl-spir64-unknown-unknown // RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -L/dummy/dir %t_obj.o -Wl,@%/t_arg.arg -### 2>&1 \ // RUN: | FileCheck %s -check-prefixes=WHOLE_STATIC_LIB,WHOLE_STATIC_LIB_DEF -DBUNDLE_TRIPLE=sycl-spir64-unknown-unknown -// RUN: not %clangxx -target x86_64-unknown-linux-gnu -fsycl -fsycl-targets=nvptx64-nvidia-cuda -L/dummy/dir %t_obj.o -Wl,--whole-archive %t_lib.a %t_lib_2.a -Wl,--no-whole-archive -### 2>&1 \ +// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -L/dummy/dir %t_obj.o -Wl,--whole-archive %t_lib.a %t_lib_2.a -Wl,--no-whole-archive -### 2>&1 \ // RUN: | FileCheck %s -check-prefixes=WHOLE_STATIC_LIB,WHOLE_STATIC_LIB_1,WHOLE_STATIC_LIB_NVPTX -DBUNDLE_TRIPLE=sycl-nvptx64-nvidia-cuda-sm_50 -// RUN: not %clangxx -target x86_64-unknown-linux-gnu -fsycl -fsycl-targets=nvptx64-nvidia-cuda -L/dummy/dir %t_obj.o -Wl,@%/t_arg.arg -### 2>&1 \ +// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -L/dummy/dir %t_obj.o -Wl,@%/t_arg.arg -### 2>&1 \ // RUN: | FileCheck %s -check-prefixes=WHOLE_STATIC_LIB,WHOLE_STATIC_LIB_NVPTX -DBUNDLE_TRIPLE=sycl-nvptx64-nvidia-cuda-sm_50 // WHOLE_STATIC_LIB: clang-offload-bundler{{.*}} "-type=o" "-targets={{.*}},[[BUNDLE_TRIPLE]]" // WHOLE_STATIC_LIB_DEF: clang-offload-bundler{{.*}} "-type=aoo" "-targets=[[BUNDLE_TRIPLE]]" "-input=[[INPUTA:.+\.a]]" "-output=[[OUTPUTA:.+\.txt]]" @@ -224,9 +224,9 @@ // RUN: | FileCheck %s -check-prefix=STATIC_LIB_NOSRC -check-prefix=STATIC_LIB_NOSRC-SPIR -DTARGET=spir64 -DBUNDLE_TRIPLE=sycl-spir64-unknown-unknown // RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -L/dummy/dir %t_lib.lo -### 2>&1 \ // RUN: | FileCheck %s -check-prefix=STATIC_LIB_NOSRC -check-prefix=STATIC_LIB_NOSRC-SPIR -DTARGET=spir64 -DBUNDLE_TRIPLE=sycl-spir64-unknown-unknown -// RUN: not %clangxx -target x86_64-unknown-linux-gnu -fsycl -fsycl-targets=nvptx64-nvidia-cuda -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -L/dummy/dir %t_lib.a -### 2>&1 \ +// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -L/dummy/dir %t_lib.a -### 2>&1 \ // RUN: | FileCheck %s -check-prefix=STATIC_LIB_NOSRC -check-prefix=STATIC_LIB_NOSRC-CUDA -DTARGET=nvptx64 -DBUNDLE_TRIPLE=sycl-nvptx64-nvidia-cuda-sm_50 -// RUN: not %clangxx -target x86_64-unknown-linux-gnu -fsycl -fsycl-targets=nvptx64-nvidia-cuda -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -L/dummy/dir %t_lib.lo -### 2>&1 \ +// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -L/dummy/dir %t_lib.lo -### 2>&1 \ // RUN: | FileCheck %s -check-prefix=STATIC_LIB_NOSRC -check-prefix=STATIC_LIB_NOSRC-CUDA -DTARGET=nvptx64 -DBUNDLE_TRIPLE=sycl-nvptx64-nvidia-cuda-sm_50 // STATIC_LIB_NOSRC-SPIR: clang-offload-bundler{{.*}} "-type=aoo" "-targets=[[BUNDLE_TRIPLE]]" "-input={{.*}}_lib.{{(a|lo)}}" "-output=[[DEVICELIB:.+\.txt]]" "-unbundle" // STATIC_LIB_NOSRC-SPIR: llvm-foreach{{.*}}spirv-to-ir-wrapper{{.*}} "[[DEVICELIB]]" "-o" "[[DEVICELIST:.+\.txt]]" diff --git a/clang/test/Driver/sycl-offload-with-split.c b/clang/test/Driver/sycl-offload-with-split.c index 7f538ce2acaf7..19dc73ca26b21 100644 --- a/clang/test/Driver/sycl-offload-with-split.c +++ b/clang/test/Driver/sycl-offload-with-split.c @@ -346,7 +346,7 @@ // RUN: | FileCheck %s -check-prefixes=CHK-ESIMD-SPLIT-OFF // RUN: %clang -### -fsycl %s 2>&1 \ // RUN: | FileCheck %s -check-prefixes=CHK-ESIMD-SPLIT-DEFAULT -// RUN: not %clang -### -fsycl -fsycl-targets=nvptx64-nvidia-cuda %s 2>&1 \ +// RUN: %clang -### -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda %s 2>&1 \ // RUN: | FileCheck %s -check-prefixes=CHK-ESIMD-SPLIT-NON-SPIRV // CHK-ESIMD-SPLIT-ON: sycl-post-link{{.*}} "-split-esimd"{{.*}} "-o"{{.*}} // CHK-ESIMD-SPLIT-OFF-NOT: sycl-post-link{{.*}} "-split-esimd"{{.*}} diff --git a/clang/test/Driver/sycl-oneapi-gpu.cpp b/clang/test/Driver/sycl-oneapi-gpu.cpp index 39bff7200e791..4f14691297392 100644 --- a/clang/test/Driver/sycl-oneapi-gpu.cpp +++ b/clang/test/Driver/sycl-oneapi-gpu.cpp @@ -100,33 +100,33 @@ /// Tests the behaviors of using -fsycl-targets=nvidia_gpu* -// RUN: not %clangxx -fsycl -fsycl-targets=nvidia_gpu_sm_50 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_50 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_NVIDIA,MACRO_NVIDIA -DDEV_STR=sm_50 -DMAC_STR=SM_50 -// RUN: not %clangxx -fsycl -fsycl-targets=nvidia_gpu_sm_52 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_52 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_NVIDIA,MACRO_NVIDIA -DDEV_STR=sm_52 -DMAC_STR=SM_52 -// RUN: not %clangxx -fsycl -fsycl-targets=nvidia_gpu_sm_53 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_53 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_NVIDIA,MACRO_NVIDIA -DDEV_STR=sm_53 -DMAC_STR=SM_53 -// RUN: not %clangxx -fsycl -fsycl-targets=nvidia_gpu_sm_60 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_60 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_NVIDIA,MACRO_NVIDIA -DDEV_STR=sm_60 -DMAC_STR=SM_60 -// RUN: not %clangxx -fsycl -fsycl-targets=nvidia_gpu_sm_61 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_61 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_NVIDIA,MACRO_NVIDIA -DDEV_STR=sm_61 -DMAC_STR=SM_61 -// RUN: not %clangxx -fsycl -fsycl-targets=nvidia_gpu_sm_62 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_62 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_NVIDIA,MACRO_NVIDIA -DDEV_STR=sm_62 -DMAC_STR=SM_62 -// RUN: not %clangxx -fsycl -fsycl-targets=nvidia_gpu_sm_70 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_70 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_NVIDIA,MACRO_NVIDIA -DDEV_STR=sm_70 -DMAC_STR=SM_70 -// RUN: not %clangxx -fsycl -fsycl-targets=nvidia_gpu_sm_72 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_72 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_NVIDIA,MACRO_NVIDIA -DDEV_STR=sm_72 -DMAC_STR=SM_72 -// RUN: not %clangxx -fsycl -fsycl-targets=nvidia_gpu_sm_75 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_75 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_NVIDIA,MACRO_NVIDIA -DDEV_STR=sm_75 -DMAC_STR=SM_75 -// RUN: not %clangxx -fsycl -fsycl-targets=nvidia_gpu_sm_80 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_80 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_NVIDIA,MACRO_NVIDIA -DDEV_STR=sm_80 -DMAC_STR=SM_80 -// RUN: not %clangxx -fsycl -fsycl-targets=nvidia_gpu_sm_86 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_86 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_NVIDIA,MACRO_NVIDIA -DDEV_STR=sm_86 -DMAC_STR=SM_86 -// RUN: not %clangxx -fsycl -fsycl-targets=nvidia_gpu_sm_87 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_87 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_NVIDIA,MACRO_NVIDIA -DDEV_STR=sm_87 -DMAC_STR=SM_87 -// RUN: not %clangxx -fsycl -fsycl-targets=nvidia_gpu_sm_89 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_89 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_NVIDIA,MACRO_NVIDIA -DDEV_STR=sm_89 -DMAC_STR=SM_89 -// RUN: not %clangxx -fsycl -fsycl-targets=nvidia_gpu_sm_90 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_90 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_NVIDIA,MACRO_NVIDIA -DDEV_STR=sm_90 -DMAC_STR=SM_90 // MACRO_NVIDIA: clang{{.*}} "-triple" "nvptx64-nvidia-cuda" // DEVICE_NVIDIA: llvm-foreach{{.*}} "--gpu-name" "[[DEV_STR]]" @@ -135,49 +135,49 @@ /// Tests the behaviors of using -fsycl-targets=amd_gpu* -// RUN: not %clangxx -fsycl -fsycl-targets=amd_gpu_gfx700 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nogpulib -fsycl-targets=amd_gpu_gfx700 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx700 -DMAC_STR=GFX700 -// RUN: not %clangxx -fsycl -fsycl-targets=amd_gpu_gfx701 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nogpulib -fsycl-targets=amd_gpu_gfx701 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx701 -DMAC_STR=GFX701 -// RUN: not %clangxx -fsycl -fsycl-targets=amd_gpu_gfx702 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nogpulib -fsycl-targets=amd_gpu_gfx702 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx702 -DMAC_STR=GFX702 -// RUN: not %clangxx -fsycl -fsycl-targets=amd_gpu_gfx801 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nogpulib -fsycl-targets=amd_gpu_gfx801 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx801 -DMAC_STR=GFX801 -// RUN: not %clangxx -fsycl -fsycl-targets=amd_gpu_gfx802 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nogpulib -fsycl-targets=amd_gpu_gfx802 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx802 -DMAC_STR=GFX802 -// RUN: not %clangxx -fsycl -fsycl-targets=amd_gpu_gfx803 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nogpulib -fsycl-targets=amd_gpu_gfx803 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx803 -DMAC_STR=GFX803 -// RUN: not %clangxx -fsycl -fsycl-targets=amd_gpu_gfx805 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nogpulib -fsycl-targets=amd_gpu_gfx805 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx805 -DMAC_STR=GFX805 -// RUN: not %clangxx -fsycl -fsycl-targets=amd_gpu_gfx810 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nogpulib -fsycl-targets=amd_gpu_gfx810 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx810 -DMAC_STR=GFX810 -// RUN: not %clangxx -fsycl -fsycl-targets=amd_gpu_gfx900 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nogpulib -fsycl-targets=amd_gpu_gfx900 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx900 -DMAC_STR=GFX900 -// RUN: not %clangxx -fsycl -fsycl-targets=amd_gpu_gfx902 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nogpulib -fsycl-targets=amd_gpu_gfx902 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx902 -DMAC_STR=GFX902 -// RUN: not %clangxx -fsycl -fsycl-targets=amd_gpu_gfx904 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nogpulib -fsycl-targets=amd_gpu_gfx904 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx904 -DMAC_STR=GFX904 -// RUN: not %clangxx -fsycl -fsycl-targets=amd_gpu_gfx906 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nogpulib -fsycl-targets=amd_gpu_gfx906 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx906 -DMAC_STR=GFX906 -// RUN: not %clangxx -fsycl -fsycl-targets=amd_gpu_gfx908 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nogpulib -fsycl-targets=amd_gpu_gfx908 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx908 -DMAC_STR=GFX908 -// RUN: not %clangxx -fsycl -fsycl-targets=amd_gpu_gfx90a -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nogpulib -fsycl-targets=amd_gpu_gfx90a -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx90a -DMAC_STR=GFX90A -// RUN: not %clangxx -fsycl -fsycl-targets=amd_gpu_gfx1010 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nogpulib -fsycl-targets=amd_gpu_gfx1010 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx1010 -DMAC_STR=GFX1010 -// RUN: not %clangxx -fsycl -fsycl-targets=amd_gpu_gfx1011 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nogpulib -fsycl-targets=amd_gpu_gfx1011 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx1011 -DMAC_STR=GFX1011 -// RUN: not %clangxx -fsycl -fsycl-targets=amd_gpu_gfx1012 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nogpulib -fsycl-targets=amd_gpu_gfx1012 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx1012 -DMAC_STR=GFX1012 -// RUN: not %clangxx -fsycl -fsycl-targets=amd_gpu_gfx1013 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nogpulib -fsycl-targets=amd_gpu_gfx1013 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx1013 -DMAC_STR=GFX1013 -// RUN: not %clangxx -fsycl -fsycl-targets=amd_gpu_gfx1030 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nogpulib -fsycl-targets=amd_gpu_gfx1030 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx1030 -DMAC_STR=GFX1030 -// RUN: not %clangxx -fsycl -fsycl-targets=amd_gpu_gfx1031 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nogpulib -fsycl-targets=amd_gpu_gfx1031 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx1031 -DMAC_STR=GFX1031 -// RUN: not %clangxx -fsycl -fsycl-targets=amd_gpu_gfx1032 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nogpulib -fsycl-targets=amd_gpu_gfx1032 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx1032 -DMAC_STR=GFX1032 -// RUN: not %clangxx -fsycl -fsycl-targets=amd_gpu_gfx1034 -### %s 2>&1 | \ +// RUN: %clangxx -fsycl -nogpulib -fsycl-targets=amd_gpu_gfx1034 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx1034 -DMAC_STR=GFX1034 // MACRO_AMD: clang{{.*}} "-triple" "amdgcn-amd-amdhsa" // MACRO_AMD: "-D__SYCL_TARGET_AMD_GPU_[[MAC_STR]]__" @@ -223,14 +223,14 @@ // FATO: "-targets=sycl-spir64_gen-unknown-unknown-skl,host-x86_64-unknown-linux-gnu" /// Test for proper creation of fat object -// RUN: not %clangxx -c -fsycl -fsycl-targets=nvidia_gpu_sm_50 \ +// RUN: %clangxx -c -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_50 \ // RUN: -target x86_64-unknown-linux-gnu -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefix=NVIDIA_FATO // NVIDIA_FATO: clang-offload-bundler{{.*}} "-type=o" // NVIDIA_FATO: "-targets=sycl-nvptx64-nvidia-cuda-sm_50,host-x86_64-unknown-linux-gnu" /// Test for proper creation of fat object -// RUN: not %clangxx -fsycl -fsycl-targets=amd_gpu_gfx700 \ +// RUN: %clangxx -fsycl -nogpulib -fsycl-targets=amd_gpu_gfx700 \ // RUN: -target x86_64-unknown-linux-gnu -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefix=AMD_FATO // AMD_FATO: clang-offload-bundler{{.*}} "-type=o" @@ -247,7 +247,7 @@ /// Test for proper consumption of fat object // RUN: touch %t.o -// RUN: not %clangxx -fsycl -fsycl-targets=nvidia_gpu_sm_50 \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvidia_gpu_sm_50 \ // RUN: -target x86_64-unknown-linux-gnu -### %t.o 2>&1 | \ // RUN: FileCheck %s --check-prefix=NVIDIA_CONSUME_FAT // NVIDIA_CONSUME_FAT: clang-offload-bundler{{.*}} "-type=o" @@ -256,7 +256,7 @@ /// Test for proper consumption of fat object // RUN: touch %t.o -// RUN: not %clangxx -fsycl -fsycl-targets=amd_gpu_gfx700 \ +// RUN: %clangxx -fsycl -nogpulib -fsycl-targets=amd_gpu_gfx700 \ // RUN: -target x86_64-unknown-linux-gnu -### %t.o 2>&1 | \ // RUN: FileCheck %s --check-prefix=AMD_CONSUME_FAT // AMD_CONSUME_FAT: clang-offload-bundler{{.*}} "-type=o" diff --git a/clang/test/Driver/sycl-target-mismatch.cpp b/clang/test/Driver/sycl-target-mismatch.cpp index 0dfb3afd2a266..a1a1605f532fa 100644 --- a/clang/test/Driver/sycl-target-mismatch.cpp +++ b/clang/test/Driver/sycl-target-mismatch.cpp @@ -24,55 +24,55 @@ // RUN: | FileCheck %s -check-prefix=SPIR64_DIAG // SPIR64_DIAG-NOT: linked binaries do not contain expected -// RUN: not %clangxx -fsycl -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_60 \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_60 \ // RUN: %S/Inputs/SYCL/libnvptx64-sm_50.a -### %s 2>&1 \ // RUN: | FileCheck %s -check-prefix=NVPTX64_DIAG -// RUN: not %clangxx -fsycl -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_60 \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_60 \ // RUN: -L%S/Inputs/SYCL -lnvptx64-sm_50 -### %s 2>&1 \ // RUN: | FileCheck %s -check-prefix=NVPTX64_DIAG -// RUN: not %clangxx -fsycl -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_60 \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_60 \ // RUN: %S/Inputs/SYCL/objnvptx64-sm_50.o -### %s 2>&1 \ // RUN: | FileCheck %s -check-prefix=NVPTX64_DIAG // NVPTX64_DIAG: linked binaries do not contain expected 'nvptx64-nvidia-cuda--sm_60' target; found targets: 'nvptx64-nvidia-cuda--sm_50' [-Wsycl-target] -// RUN: not %clangxx -fsycl -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_50 \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_50 \ // RUN: %S/Inputs/SYCL/libnvptx64-sm_50.a -### %s 2>&1 \ // RUN: | FileCheck %s -check-prefix=NVPTX64_MATCH_DIAG -// RUN: not %clangxx -fsycl -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_50 \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_50 \ // RUN: -L%S/Inputs/SYCL -lnvptx64-sm_50 -### %s 2>&1 \ // RUN: | FileCheck %s -check-prefix=NVPTX64_MATCH_DIAG -// RUN: not %clangxx -fsycl -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_50 \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_50 \ // RUN: %S/Inputs/SYCL/objnvptx64-sm_50.o -### %s 2>&1 \ // RUN: | FileCheck %s -check-prefix=NVPTX64_MATCH_DIAG -// RUN: not %clangxx -fsycl -fsycl-targets=nvptx64-nvidia-cuda \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda \ // RUN: %S/Inputs/SYCL/objnvptx64-sm_50.o -### %s 2>&1 \ // RUN: | FileCheck %s -check-prefix=NVPTX64_MATCH_DIAG -// RUN: not %clangxx -fsycl -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_60 \ +// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_60 \ // RUN: -Wno-sycl-target %S/Inputs/SYCL/objnvptx64-sm_50.o -### %s 2>&1 \ // RUN: | FileCheck %s -check-prefix=NVPTX64_MATCH_DIAG // NVPTX64_MATCH_DIAG-NOT: linked binaries do not contain expected -// RUN: not %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 \ +// RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 -nogpulib\ // RUN: %S/Inputs/SYCL/libamdgcn-gfx908.a -### %s 2>&1 \ // RUN: | FileCheck %s -check-prefix=AMDGCN_DIAG -// RUN: not %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 \ +// RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 -nogpulib\ // RUN: -L%S/Inputs/SYCL -lamdgcn-gfx908 -### %s 2>&1 \ // RUN: | FileCheck %s -check-prefix=AMDGCN_DIAG -// RUN: not %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 \ +// RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 -nogpulib\ // RUN: %S/Inputs/SYCL/objamdgcn-gfx908.o -### %s 2>&1 \ // RUN: | FileCheck %s -check-prefix=AMDGCN_DIAG // AMDGCN_DIAG: linked binaries do not contain expected 'amdgcn-amd-amdhsa--gfx906' target; found targets: 'amdgcn-amd-amdhsa--gfx908' [-Wsycl-target] -// RUN: not %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx908 \ +// RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx908 -nogpulib\ // RUN: %S/Inputs/SYCL/libamdgcn-gfx908.a -### %s 2>&1 \ // RUN: | FileCheck %s -check-prefix=AMDGCN_MATCH_DIAG -// RUN: not %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx908 \ +// RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx908 -nogpulib\ // RUN: -L%S/Inputs/SYCL -lamdgcn-gfx908 -### %s 2>&1 \ // RUN: | FileCheck %s -check-prefix=AMDGCN_MATCH_DIAG -// RUN: not %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx908 \ +// RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx908 -nogpulib\ // RUN: %S/Inputs/SYCL/objamdgcn-gfx908.o -### %s 2>&1 \ // RUN: | FileCheck %s -check-prefix=AMDGCN_MATCH_DIAG -// RUN: not %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 \ +// RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 -nogpulib\ // RUN: -Wno-sycl-target %S/Inputs/SYCL/objamdgcn-gfx908.o -### %s 2>&1 \ // RUN: | FileCheck %s -check-prefix=AMDGCN_MATCH_DIAG // AMDGCN_MATCH_DIAG-NOT: linked binaries do not contain expected diff --git a/clang/test/Driver/sycl-triple-dae-flags.cpp b/clang/test/Driver/sycl-triple-dae-flags.cpp index 820a4db8e5c91..1fe662a7f980d 100644 --- a/clang/test/Driver/sycl-triple-dae-flags.cpp +++ b/clang/test/Driver/sycl-triple-dae-flags.cpp @@ -1,9 +1,9 @@ -// RUN: not %clangxx -### -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 -fsycl-dead-args-optimization %s 2> %t.rocm.out +// RUN: %clangxx -### -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 -fsycl-dead-args-optimization -nogpulib %s 2> %t.rocm.out // RUN: FileCheck %s --input-file %t.rocm.out // CHECK-NOT: -fenable-sycl-dae // CHECK-NOT: -emit-param-info // -// RUN: not %clangxx -### -fsycl -fsycl-targets=nvptx64-nvidia-cuda -fsycl-dead-args-optimization %s 2> %t.cuda.out +// RUN: %clangxx -### -fsycl -fsycl-targets=nvptx64-nvidia-cuda -fsycl-dead-args-optimization -nocudalib %s 2> %t.cuda.out // RUN: FileCheck %s --check-prefixes=CHECK-FENABLE,CHECK-EMIT --input-file %t.cuda.out // // RUN: %clangxx -### -fsycl -fsycl-targets=spir64-unknown-unknown -fsycl-dead-args-optimization %s 2> %t.out