xref: /llvm-project/clang/test/Driver/sycl-link-spirv-target.cpp (revision eeee5a44bbf24f2f30a313ecf66e6a76de365658)
1 // Tests the driver when linking LLVM IR bitcode files and targeting SPIR-V
2 // architecture.
3 //
4 // Test that -Xlinker options are being passed to clang-sycl-linker.
5 // RUN: touch %t.bc
6 // RUN: %clangxx -### --target=spirv64 --sycl-link -Xlinker --llvm-spirv-path=/tmp \
7 // RUN:   -Xlinker --library-path=/tmp -Xlinker --device-libs=lib1.bc,lib2.bc %t.bc 2>&1 \
8 // RUN:   | FileCheck %s -check-prefix=XLINKEROPTS
9 // XLINKEROPTS: "{{.*}}clang-sycl-linker{{.*}}" "--llvm-spirv-path=/tmp" "--library-path=/tmp" "--device-libs=lib1.bc,lib2.bc" "{{.*}}.bc" "-o" "a.out"
10