[clang] 5896e2d - [Clang] Fix HIP tests when running on Windows with the LLVM toolchain is in the path
Alexandre Ganea via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 23 13:54:57 PDT 2020
Author: Alexandre Ganea
Date: 2020-03-23T16:54:48-04:00
New Revision: 5896e2df45dab7680be321ee63903431a673817b
URL: https://github.com/llvm/llvm-project/commit/5896e2df45dab7680be321ee63903431a673817b
DIFF: https://github.com/llvm/llvm-project/commit/5896e2df45dab7680be321ee63903431a673817b.diff
LOG: [Clang] Fix HIP tests when running on Windows with the LLVM toolchain is in the path
On Windows, when the LLVM toolchain is in the current path (%PATH%), fusing the linker yields c:\{path}\lld.exe whereas the hip tests did not expect the .exe part.
This only happens if LLD is not present in the build folder, which consequently makes the code in Driver::GetProgramPath() to fall back to %PATH% and platform-specific search, which includes the .exe part (see https://github.com/llvm/llvm-project/blob/master/clang/lib/Driver/Driver.cpp#L4733).
Differential Revision: https://reviews.llvm.org/D76631
Added:
Modified:
clang/test/Driver/hip-device-compile.hip
clang/test/Driver/hip-toolchain-no-rdc.hip
clang/test/Driver/hip-toolchain-rdc.hip
Removed:
################################################################################
diff --git a/clang/test/Driver/hip-device-compile.hip b/clang/test/Driver/hip-device-compile.hip
index b6f1f1cf218e..c442d23581ce 100644
--- a/clang/test/Driver/hip-device-compile.hip
+++ b/clang/test/Driver/hip-device-compile.hip
@@ -42,7 +42,7 @@
// CHECK-NOT: {{"*.llvm-link"}}
// CHECK-NOT: {{".*opt"}}
// CHECK-NOT: {{".*llc"}}
-// CHECK-NOT: {{".*lld"}}
+// CHECK-NOT: {{".*lld.*"}}
// CHECK-NOT: {{".*clang-offload-bundler"}}
// CHECK-NOT: {{".*ld.*"}}
@@ -67,6 +67,6 @@
// BUNDLE: {{"*.llvm-link"}}
// BUNDLE: {{".*opt"}}
// BUNDLE: {{".*llc"}}
-// BUNDLE: {{".*lld"}}
+// BUNDLE: {{".*lld.*"}}
// BUNDLE: {{".*clang-offload-bundler"}}
diff --git a/clang/test/Driver/hip-toolchain-no-rdc.hip b/clang/test/Driver/hip-toolchain-no-rdc.hip
index cda852e2d8c7..4371334577f7 100644
--- a/clang/test/Driver/hip-toolchain-no-rdc.hip
+++ b/clang/test/Driver/hip-toolchain-no-rdc.hip
@@ -38,7 +38,7 @@
// CHECK-SAME: "-filetype=obj"
// CHECK-SAME: "-o" [[OBJ_DEV_A_803:".*-gfx803-.*o"]]
-// CHECK: [[LLD: ".*lld"]] "-flavor" "gnu" "-shared"
+// CHECK: [[LLD: ".*lld.*"]] "-flavor" "gnu" "-shared"
// CHECK-SAME: "-o" "[[IMG_DEV_A_803:.*out]]" [[OBJ_DEV_A_803]]
//
@@ -67,7 +67,7 @@
// CHECK-SAME: "-filetype=obj"
// CHECK-SAME: "-o" [[OBJ_DEV_A_900:".*-gfx900-.*o"]]
-// CHECK: [[LLD: ".*lld"]] "-flavor" "gnu" "-shared"
+// CHECK: [[LLD]] "-flavor" "gnu" "-shared"
// CHECK-SAME: "-o" "[[IMG_DEV_A_900:.*out]]" [[OBJ_DEV_A_900]]
//
@@ -112,7 +112,7 @@
// CHECK-SAME: "-filetype=obj"
// CHECK-SAME: "-o" [[OBJ_DEV_B_803:".*-gfx803-.*o"]]
-// CHECK: [[LLD: ".*lld"]] "-flavor" "gnu" "-shared"
+// CHECK: [[LLD]] "-flavor" "gnu" "-shared"
// CHECK-SAME: "-o" "[[IMG_DEV_B_803:.*out]]" [[OBJ_DEV_B_803]]
//
@@ -141,7 +141,7 @@
// CHECK-SAME: "-filetype=obj"
// CHECK-SAME: "-o" [[OBJ_DEV_B_900:".*-gfx900-.*o"]]
-// CHECK: [[LLD: ".*lld"]] "-flavor" "gnu" "-shared"
+// CHECK: [[LLD]] "-flavor" "gnu" "-shared"
// CHECK-SAME: "-o" "[[IMG_DEV_B_900:.*out]]" [[OBJ_DEV_B_900]]
//
diff --git a/clang/test/Driver/hip-toolchain-rdc.hip b/clang/test/Driver/hip-toolchain-rdc.hip
index 18fd1d7b09a0..203784f2ab43 100644
--- a/clang/test/Driver/hip-toolchain-rdc.hip
+++ b/clang/test/Driver/hip-toolchain-rdc.hip
@@ -44,7 +44,7 @@
// CHECK-SAME: "-filetype=obj"
// CHECK-SAME: "-o" [[OBJ_DEV1:".*-gfx803-.*o"]]
-// CHECK: [[LLD: ".*lld"]] "-flavor" "gnu" "-shared"
+// CHECK: [[LLD: ".*lld.*"]] "-flavor" "gnu" "-shared"
// CHECK-SAME: "-o" "[[IMG_DEV1:.*out]]" [[OBJ_DEV1]]
// CHECK: [[CLANG]] "-cc1" "-triple" "amdgcn-amd-amdhsa"
More information about the cfe-commits
mailing list