================
@@ -0,0 +1,45 @@
+; Tests non-functional command line options of the clang-sycl-linker tool.
+;
+; REQUIRES: spirv-registered-target
+;
+; Test --help
+; RUN: clang-sycl-linker --help | FileCheck %s --check-prefix=HELP
+; HELP: OVERVIEW: A utility that wraps around several steps required to link 
SYCL device files.
+; HELP: USAGE: clang-sycl-linker
+; HELP: OPTIONS:
+;
+; Test --version
+; RUN: clang-sycl-linker --version | FileCheck %s --check-prefix=VERSION
+; VERSION: clang-sycl-linker version
+;
+; Test missing input files
+; RUN: not clang-sycl-linker -triple=spirv64 -o %t.out 2>&1 | FileCheck %s 
--check-prefix=NO-INPUT
+; NO-INPUT: No input files provided
+;
+; Create a simple bitcode file for subsequent tests
+; RUN: llvm-as %s -o %t.bc
+;
+; Test --print-linked-module
+; RUN: clang-sycl-linker -triple=spirv64 %t.bc --print-linked-module -o %t.out 
> %t.ll
+; RUN: FileCheck %s --check-prefix=PRINT-LINKED < %t.ll
+; PRINT-LINKED: target triple = "spirv64"
+;
+; RUN: rm -rf %t.dir && mkdir -p %t.dir
+;
+; Test --spirv-dump-device-code (copies SPIR-V output to given directory)
+; RUN: clang-sycl-linker -triple=spirv64 %t.bc --spirv-dump-device-code=%t.dir 
-o out.spv
+; RUN: ls %t.dir/out_0.spv | count 1
+;
+; Test --spirv-dump-device-code with no value (fallback to ./)
+; RUN: mkdir -p %t.dir/fallback
+; RUN: cd %t.dir/fallback && clang-sycl-linker -triple=spirv64 %t.bc 
--spirv-dump-device-code= -o out.spv
+; RUN: ls %t.dir/fallback/out_0.spv | count 1
+;
----------------
sarnex wrote:

Yeah I would just error

https://github.com/llvm/llvm-project/pull/200096
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to