83 lines · plain
1// Output bundled code objects for combined compilation.2// RUN: %clang -### -c --target=x86_64-linux-gnu -fgpu-rdc --no-offload-new-driver \3// RUN: -nogpulib -nogpuinc --offload-arch=gfx803 --offload-arch=gfx900 %s \4// RUN: 2>&1 | FileCheck %s5 6// CHECK: {{.*}}clang-offload-bundler{{.*}}"-output=hip-output-file-name.o"7 8// Check -E default output is "-" (stdout).9// If there are multiple preprocessor expansion outputs clang-offload-bundler10// is used to bundle the final output.11 12// Output bundled PPE for one GPU for mixed compliation.13// RUN: %clang -### -E --target=x86_64-linux-gnu --no-offload-new-driver \14// RUN: -nogpulib -nogpuinc --offload-arch=gfx803 %s \15// RUN: 2>&1 | FileCheck -check-prefixes=DASH %s16 17// Output unbundled PPE for one GPU for device only compilation.18// RUN: %clang -### -E --offload-device-only --target=x86_64-linux-gnu \19// RUN: --no-offload-new-driver -nogpulib -nogpuinc --offload-arch=gfx803 %s \20// RUN: 2>&1 | FileCheck -check-prefixes=CLANG-DASH %s21 22// Output bundled PPE for two GPUs for mixed compilation.23// RUN: %clang -### -E --target=x86_64-linux-gnu --no-offload-new-driver \24// RUN: -nogpulib -nogpuinc --offload-arch=gfx803 --offload-arch=gfx900 %s \25// RUN: 2>&1 | FileCheck -check-prefixes=DASH %s26 27// Output bundled PPE for two GPUs for mixed compilation with -save-temps.28// RUN: %clang -### -E -save-temps --target=x86_64-linux-gnu --no-offload-new-driver \29// RUN: -nogpulib -nogpuinc --offload-arch=gfx803 --offload-arch=gfx900 %s \30// RUN: 2>&1 | FileCheck -check-prefixes=DASH %s31 32// Output unbundled PPE for two GPUs for device only compilation.33// RUN: %clang -### -E --offload-device-only --target=x86_64-linux-gnu --no-offload-new-driver \34// RUN: -nogpulib -nogpuinc --offload-arch=gfx803 --offload-arch=gfx900 %s \35// RUN: 2>&1 | FileCheck -check-prefixes=CLANG-DASH %s36 37// Output bundled PPE for two GPUs for device only compilation with --gpu-bundle-output.38// RUN: %clang -### -E --offload-device-only --target=x86_64-linux-gnu --no-offload-new-driver \39// RUN: -nogpulib -nogpuinc --offload-arch=gfx803 --offload-arch=gfx900 %s --gpu-bundle-output \40// RUN: 2>&1 | FileCheck -check-prefixes=DASH %s41 42// Output unbundled PPE for two GPUs for device only compilation with --no-gpu-bundle-output.43// RUN: %clang -### -E --offload-device-only --target=x86_64-linux-gnu --no-offload-new-driver \44// RUN: -nogpulib -nogpuinc --offload-arch=gfx803 --offload-arch=gfx900 %s --no-gpu-bundle-output \45// RUN: 2>&1 | FileCheck -check-prefixes=CLANG-DASH %s46 47// Output unbundled PPE for host only compilation.48// RUN: %clang -### -E --offload-host-only --target=x86_64-linux-gnu --no-offload-new-driver \49// RUN: -nogpulib -nogpuinc --offload-arch=gfx803 --offload-arch=gfx900 %s \50// RUN: 2>&1 | FileCheck -check-prefixes=CLANG-DASH %s51 52// DASH-NOT: {{.*}}clang{{.*}}"-o" "-"53// DASH: {{.*}}clang-offload-bundler{{.*}}"-output=-"54// CLANG-DASH: {{.*}}clang{{.*}}"-o" "-"55// CLANG-DASH-NOT: {{.*}}clang-offload-bundler{{.*}}"-output=-"56 57// Check -E with -o.58 59// Output bundled PPE for two GPUs for mixed compilation.60// RUN: %clang -### -E -o test.cui --target=x86_64-linux-gnu --no-offload-new-driver \61// RUN: -nogpulib -nogpuinc --offload-arch=gfx803 --offload-arch=gfx900 %s \62// RUN: 2>&1 | FileCheck -check-prefixes=OUT %s63 64// Output bundled PPE for two GPUs for mixed compilation.65// RUN: %clang -### -E -o test.cui -save-temps --target=x86_64-linux-gnu --no-offload-new-driver \66// RUN: -nogpulib -nogpuinc --offload-arch=gfx803 --offload-arch=gfx900 %s \67// RUN: 2>&1 | FileCheck -check-prefixes=OUT %s68 69// Output bundled PPE for two GPUs for device only compilation with --gpu-bundle-output.70// RUN: %clang -### -E -o test.cui --offload-device-only --target=x86_64-linux-gnu --no-offload-new-driver \71// RUN: -nogpulib -nogpuinc --offload-arch=gfx803 --offload-arch=gfx900 --gpu-bundle-output %s \72// RUN: 2>&1 | FileCheck -check-prefixes=OUT %s73 74// Output unbundled PPE for two GPUs for device only compilation.75// RUN: %clang -### -E -o test.cui --offload-host-only --target=x86_64-linux-gnu --no-offload-new-driver \76// RUN: -nogpulib -nogpuinc --offload-arch=gfx803 --offload-arch=gfx900 %s \77// RUN: 2>&1 | FileCheck -check-prefixes=CLANG-OUT %s78 79// OUT-NOT: {{.*}}clang{{.*}}"-o" "test.cui"80// OUT: {{.*}}clang-offload-bundler{{.*}}"-output=test.cui"81// CLANG-OUT: {{.*}}clang{{.*}}"-o" "test.cui"82// CLANG-OUT-NOT: {{.*}}clang-offload-bundler{{.*}}"-output=test.cui"83