brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.7 KiB · e321970 Raw
50 lines · plain
1// -fgpu-rdc link with output2// RUN: rm -rf %t && mkdir %t3// RUN: touch %t/obj1.o4// RUN: touch %t/obj2.o5// RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \6// RUN:   --hip-link -o executable -fgpu-rdc --cuda-gpu-arch=gfx900 \7// RUN:   --no-offload-new-driver --offload-arch=gfx906  %t/obj1.o %t/obj2.o 2>&1 | \8// RUN:   FileCheck -check-prefixes=CHECK,OUT %s9 10// -fgpu-rdc link without output11// RUN: touch %t/obj1.o12// RUN: touch %t/obj2.o13// RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \14// RUN:   --no-offload-new-driver --hip-link -fgpu-rdc --cuda-gpu-arch=gfx900 \15// RUN:   --offload-arch=gfx906  %t/obj1.o %t/obj2.o 2>&1 | \16// RUN:   FileCheck -check-prefixes=CHECK,NOUT %s17 18// -fgpu-rdc link with output and --emit-static-lib19// RUN: touch %t/obj1.o20// RUN: touch %t/obj2.o21// RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \22// RUN:   --hip-link -o libTest.a -fgpu-rdc --cuda-gpu-arch=gfx900 \23// RUN:   --no-offload-new-driver --emit-static-lib \24// RUN:   --offload-arch=gfx906  %t/obj1.o %t/obj2.o 2>&1 | \25// RUN:   FileCheck -check-prefixes=CHECK,SLO %s26 27// -fgpu-rdc link without output and --emit-static-lib28// RUN: touch %t/obj1.o29// RUN: touch %t/obj2.o30// RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \31// RUN:   --hip-link -fgpu-rdc --cuda-gpu-arch=gfx900 \32// RUN:   --no-offload-new-driver --emit-static-lib \33// RUN:   --offload-arch=gfx906  %t/obj1.o %t/obj2.o 2>&1 | \34// RUN:   FileCheck -check-prefixes=CHECK,SLNO %s35 36// CHECK: "{{.*clang-offload-bundler.*}}" {{.*}} "-output=obj1-host-x86_64-unknown-linux-gnu.o" "-output=obj1-hip-amdgcn-amd-amdhsa-gfx900.o" "-output=obj1-hip-amdgcn-amd-amdhsa-gfx906.o" "-unbundle"37// CHECK: "{{.*clang-offload-bundler.*}}" {{.*}} "-output=obj2-host-x86_64-unknown-linux-gnu.o" "-output=obj2-hip-amdgcn-amd-amdhsa-gfx900.o" "-output=obj2-hip-amdgcn-amd-amdhsa-gfx906.o" "-unbundle"38// CHECK-NOT: {{".*/llvm-link"}}39// CHECK-NOT: {{".*/opt"}}40// CHECK-NOT: {{".*/llc"}}41// CHECK: "{{.*lld.*}}" {{.*}} "-plugin-opt=-amdgpu-internalize-symbols"42// CHECK-SAME: "-o" "[[HIPFB1:.+]]" "obj1-hip-amdgcn-amd-amdhsa-gfx900.o" "obj2-hip-amdgcn-amd-amdhsa-gfx900.o"43// CHECK: "{{.*lld.*}}" {{.*}} "-plugin-opt=-amdgpu-internalize-symbols"44// CHECK-SAME: "-o" "[[HIPFB2:.+]]" "obj1-hip-amdgcn-amd-amdhsa-gfx906.o" "obj2-hip-amdgcn-amd-amdhsa-gfx906.o"45// CHECK: "{{.*clang.*}}" "-target" "x86_64-unknown-linux-gnu" "-o" "[[OBJBUNDLE:.+.o]]" "-x" "assembler" "{{.*}}.mcin" "-c"46// OUT: "{{.*ld.*}}" {{.*}} "-o" "executable" {{.*}} "[[OBJBUNDLE]]"47// NOUT: "{{.*ld.*}}" {{.*}} "-o" "a.out" {{.*}} "[[OBJBUNDLE]]"48// SLO: "{{.*llvm-ar.*}}" "rcsD" "libTest.a" {{.*}} "[[OBJBUNDLE]]"49// SLNO: "{{.*llvm-ar.*}}" "rcsD" "a.out" {{.*}} "[[OBJBUNDLE]]"50