[clang] 6dd0bfa - [Clang][VE] Fix toolchain test when -DCLANG_DEFAULT_LINKER=lld in use
Simon Moll via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 1 09:27:59 PST 2021
Author: Simon Moll
Date: 2021-12-01T18:26:23+01:00
New Revision: 6dd0bfad0d3c7bfaa3442ad2382ce3bd8ad94be3
URL: https://github.com/llvm/llvm-project/commit/6dd0bfad0d3c7bfaa3442ad2382ce3bd8ad94be3
DIFF: https://github.com/llvm/llvm-project/commit/6dd0bfad0d3c7bfaa3442ad2382ce3bd8ad94be3.diff
LOG: [Clang][VE] Fix toolchain test when -DCLANG_DEFAULT_LINKER=lld in use
The CLANG_DEFAULT_LINKER flag overrides the default toolchain linker.
VE strictly requires 'nld' to be the default linker. This causes a test
failure in test/Driver/ve-toolchain.cpp when configured with
CLANG_DEFAULT_LINKER!=ld
Failure in clang-ppc64le-rhel
(https://lab.llvm.org/buildbot/#/builders/57/builds/12628)
Until default linker selection with CLANG_DEFAULT_LINKER!=ld is fixed
proper, we manually specify '-fuse-ld=ld' (ie the toolchain default
linker) in the ve-toolchain tests.
Added:
Modified:
clang/test/Driver/ve-toolchain.c
clang/test/Driver/ve-toolchain.cpp
Removed:
################################################################################
diff --git a/clang/test/Driver/ve-toolchain.c b/clang/test/Driver/ve-toolchain.c
index 3d6fde1447090..eb12fdffa7f6b 100644
--- a/clang/test/Driver/ve-toolchain.c
+++ b/clang/test/Driver/ve-toolchain.c
@@ -59,9 +59,11 @@
///-----------------------------------------------------------------------------
/// Checking -fintegrated-as
-// RUN: %clang -### -target ve -x assembler %s 2>&1 | \
+// RUN: %clang -### -target ve \
+// RUN: -x assembler -fuse-ld=ld %s 2>&1 | \
// RUN: FileCheck -check-prefix=AS %s
-// RUN: %clang -### -target ve -fno-integrated-as -x assembler %s 2>&1 | \
+// RUN: %clang -### -target ve \
+// RUN: -fno-integrated-as -fuse-ld=ld -x assembler %s 2>&1 | \
// RUN: FileCheck -check-prefix=NAS %s
// AS: clang{{.*}} "-cc1as"
@@ -80,6 +82,7 @@
// RUN: %clang -### -target ve-unknown-linux-gnu \
// RUN: --sysroot %S/Inputs/basic_ve_tree \
// RUN: -resource-dir=%S/Inputs/basic_ve_tree/resource_dir \
+// RUN: -fuse-ld=ld \
// RUN: %s 2>&1 | FileCheck -check-prefix=DEF %s
// DEF: clang{{.*}}" "-cc1"
diff --git a/clang/test/Driver/ve-toolchain.cpp b/clang/test/Driver/ve-toolchain.cpp
index 55bcf5b1a09c2..6567f9606b754 100644
--- a/clang/test/Driver/ve-toolchain.cpp
+++ b/clang/test/Driver/ve-toolchain.cpp
@@ -90,9 +90,11 @@
///-----------------------------------------------------------------------------
/// Checking -fintegrated-as
-// RUN: %clangxx -### -target ve -x assembler %s 2>&1 | \
+// RUN: %clangxx -### -target ve \
+// RUN: -x assembler -fuse-ld=ld %s 2>&1 | \
// RUN: FileCheck -check-prefix=AS %s
-// RUN: %clangxx -### -target ve -fno-integrated-as -x assembler %s 2>&1 | \
+// RUN: %clangxx -### -target ve \
+// RUN: -fno-integrated-as -x assembler -fuse-ld=ld %s 2>&1 | \
// RUN: FileCheck -check-prefix=NAS %s
// AS: clang{{.*}} "-cc1as"
@@ -110,6 +112,7 @@
// RUN: %clangxx -### -target ve-unknown-linux-gnu \
// RUN: --sysroot %S/Inputs/basic_ve_tree \
+// RUN: -fuse-ld=ld \
// RUN: -resource-dir=%S/Inputs/basic_ve_tree/resource_dir \
// RUN: --stdlib=c++ %s 2>&1 | FileCheck -check-prefix=DEF %s
More information about the cfe-commits
mailing list