-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Revert "[HIP] Use original file path for CUID" #108771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This reverts commit 9fc789d.
@llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: None (dyung) ChangesReverts llvm/llvm-project#107734 The test modified in this commit, hip-cuid-hash.hip is failing on MacOS:
Full diff: https://github.com/llvm/llvm-project/pull/108771.diff 2 Files Affected:
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index 758fd744fd46c2..efe398dd531da7 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -3034,7 +3034,10 @@ class OffloadingActionBuilder final {
else if (UseCUID == CUID_Hash) {
llvm::MD5 Hasher;
llvm::MD5::MD5Result Hash;
- Hasher.update(IA->getInputArg().getValue());
+ SmallString<256> RealPath;
+ llvm::sys::fs::real_path(IA->getInputArg().getValue(), RealPath,
+ /*expand_tilde=*/true);
+ Hasher.update(RealPath);
for (auto *A : Args) {
if (A->getOption().matches(options::OPT_INPUT))
continue;
diff --git a/clang/test/Driver/hip-cuid-hash.hip b/clang/test/Driver/hip-cuid-hash.hip
index 6987a98470c6c7..103a1cbf26d50a 100644
--- a/clang/test/Driver/hip-cuid-hash.hip
+++ b/clang/test/Driver/hip-cuid-hash.hip
@@ -1,15 +1,13 @@
// Check CUID generated by hash.
// The same CUID is generated for the same file with the same options.
-// RUN: cd %S
-
// 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: %S/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: %S/Inputs/hip_multiple_inputs/a.cu >>%t.out 2>&1
// RUN: FileCheck %s -check-prefixes=SAME -input-file %t.out
@@ -18,15 +16,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: Inputs/hip_multiple_inputs/a.cu >%t.out 2>&1
+// RUN: %S/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: %S/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:3c08c1ef86ef439d]]"
+// 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]+]]"
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/30/builds/6211 Here is the relevant piece of the build log for the reference
|
This patch fixes the buildbots failure of lit tests on MacOS. Since clang driver options depend on toolchain, we cannot hardcode CUID hash. On MacOS there is an extra -mlinker-version= option.
This patch fixes the buildbots failure of lit tests on MacOS. Since clang driver options depend on toolchain, we cannot hardcode CUID hash. On MacOS there is an extra -mlinker-version= option.
This patch fixes the buildbots failure of lit tests on MacOS. Since clang driver options depend on toolchain, we cannot hardcode CUID hash. On MacOS there is an extra -mlinker-version= option.
This patch fixes the buildbots failure of lit tests on MacOS. Since clang driver options depend on toolchain, we cannot hardcode CUID hash. On MacOS there is an extra -mlinker-version= option.
Reverts #107734
The test modified in this commit, hip-cuid-hash.hip is failing on MacOS: