brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 03126ae Raw
29 lines · plain
1// Test HIPSPV static device library linking2// REQUIRES: system-linux3// UNSUPPORTED: system-windows4 5// Create a dummy archive to test SDL linking6// RUN: rm -rf %t && mkdir %t7// RUN: touch %t/dummy.bc  8// RUN: llvm-ar cr %t/libSDL.a %t/dummy.bc9 10// Test that -l options are passed to llvm-link for --offload=spirv6411// RUN: %clang -### --target=x86_64-linux-gnu --offload=spirv64 \12// RUN:   --hip-path=%S/Inputs/hipspv -nohipwrapperinc %s \13// RUN:   -L%t -lSDL \14// RUN: 2>&1 | FileCheck -check-prefix=SDL-LINK %s15 16// Test that .a files are properly unbundled and passed to llvm-link  17// RUN: %clang -### --target=x86_64-linux-gnu --offload=spirv64 \18// RUN:   --hip-path=%S/Inputs/hipspv -nohipwrapperinc %s \19// RUN:   %t/libSDL.a \20// RUN: 2>&1 | FileCheck -check-prefix=SDL-ARCHIVE %s21 22// Verify that the input files are added before the SDL files in llvm-link command23// This tests the ordering fix to match HIPAMD behavior24// SDL-LINK: "{{.*}}clang-offload-bundler" "-unbundle" "-type=a" "-input={{.*}}libSDL.a" "-targets=hip-spirv64-unknown-unknown-unknown-generic" "-output=[[SDL_A:.*\.a]]" "-allow-missing-bundles"25// SDL-LINK: "{{.*}}llvm-link" "{{.*}}.bc" "[[SDL_A]]" "-o"26 27// SDL-ARCHIVE: "{{.*}}clang-offload-bundler" "-unbundle" "-type=a" "-input={{.*}}libSDL.a" "-targets=hip-spirv64-unknown-unknown-unknown-generic" "-output=[[SDL_A:.*\.a]]" "-allow-missing-bundles"  28// SDL-ARCHIVE: "{{.*}}llvm-link" "{{.*}}.bc" "[[SDL_A]]" "-o"29