// Check CUID generated by hash. // The same CUID is generated for the same file with the same options. // This test requires relative paths for input files. Since the test may be // done out of source tree, create the local directory structure and copy the // input file from the source tree into that directory. // RUN: mkdir -p %t/Inputs/hip_multiple_inputs // RUN: cp %S/Inputs/hip_multiple_inputs/a.cu %t/Inputs/hip_multiple_inputs/a.cu // RUN: cd %t // RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu --no-offload-new-driver \ // RUN: --offload-arch=gfx906 -c -nogpuinc -nogpulib -fuse-cuid=hash \ // RUN: Inputs/hip_multiple_inputs/a.cu >%t.out 2>&1 // RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu --no-offload-new-driver \ // RUN: --offload-arch=gfx906 -c -nogpuinc -nogpulib -fuse-cuid=hash \ // RUN: Inputs/hip_multiple_inputs/a.cu >>%t.out 2>&1 // RUN: FileCheck %s -check-prefixes=SAME -input-file %t.out // Check CUID generated by hash. // Different CUID's are generated for the same file with different options. // RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu -DX=1 --no-offload-new-driver \ // RUN: --offload-arch=gfx906 -c -nogpuinc -nogpulib -fuse-cuid=hash \ // RUN: Inputs/hip_multiple_inputs/a.cu >%t.out 2>&1 // RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu -DX=2 --no-offload-new-driver \ // RUN: --offload-arch=gfx906 -c -nogpuinc -nogpulib -fuse-cuid=hash \ // RUN: Inputs/../Inputs/hip_multiple_inputs/a.cu >>%t.out 2>&1 // RUN: FileCheck %s -check-prefixes=DIFF -input-file %t.out // SAME: "-cc1"{{.*}} "-target-cpu" "gfx906" {{.*}}"-cuid=[[CUID:[0-9a-f]+]]" // SAME: "-cc1"{{.*}} "-target-cpu" "gfx906" {{.*}}"-cuid=[[CUID]]" // DIFF: "-cc1"{{.*}} "-target-cpu" "gfx906" {{.*}}"-cuid=[[CUID:[0-9a-f]+]]" // DIFF-NOT: "-target-cpu" "gfx906" {{.*}}"-cuid=[[CUID]]"