[clang] [HIP] Use original file path for CUID (PR #107734)
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 9 11:09:00 PDT 2024
================
@@ -16,15 +18,15 @@
// 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: %S/Inputs/hip_multiple_inputs/a.cu >%t.out 2>&1
+// 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: %S/Inputs/../Inputs/hip_multiple_inputs/a.cu >>%t.out 2>&1
+// 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:3c08c1ef86ef439d]]"
----------------
yxsamliu wrote:
This change caused build bot failure for MacOS and the PR got reverted.
The reason that on MacOS the hash is different is that there is an extra option `-mlinker-versioin=` which is added by clang (https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/Driver.cpp#L515).
Since the hash is toolchain dependent, it seems we cannot hardcode it here and has to keep it as it was.
@Artem-B If you are OK, I will reland the patch with "-cuid=[[CUID:[0-9a-f]+]]" here.
https://github.com/llvm/llvm-project/pull/107734
More information about the cfe-commits
mailing list