[clang] 880aa6a - [test] Fix test/Driver/ve-toolchain.cpp
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 9 17:28:02 PST 2020
Author: Fangrui Song
Date: 2020-12-09T17:26:22-08:00
New Revision: 880aa6ac668b0c0aefb7c7b831e7127c3c54ee9b
URL: https://github.com/llvm/llvm-project/commit/880aa6ac668b0c0aefb7c7b831e7127c3c54ee9b
DIFF: https://github.com/llvm/llvm-project/commit/880aa6ac668b0c0aefb7c7b831e7127c3c54ee9b.diff
LOG: [test] Fix test/Driver/ve-toolchain.cpp
It should specify --sysroot to test the paths of crt1.o/crti.o/crtbegin.o.
For a user who enable VE but do not actually have VE sysroot,
the "nld" command line will have bare "crt1.o" "crti.o" ... "crtbegin.o"
Added:
Modified:
clang/test/Driver/ve-toolchain.cpp
Removed:
################################################################################
diff --git a/clang/test/Driver/ve-toolchain.cpp b/clang/test/Driver/ve-toolchain.cpp
index e056c04456ae..6243b4c3f386 100644
--- a/clang/test/Driver/ve-toolchain.cpp
+++ b/clang/test/Driver/ve-toolchain.cpp
@@ -7,12 +7,6 @@
// RUN: %clangxx -### -g -target ve %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s
// DWARF_VER: "-dwarf-version=4"
-///-----------------------------------------------------------------------------
-/// Checking dynamic-linker
-
-// RUN: %clangxx -### -target ve %s 2>&1 | FileCheck -check-prefix=DYNLINKER %s
-// DYNLINKER: nld{{.*}} "-dynamic-linker" "/opt/nec/ve/lib/ld-linux-ve.so.1"
-
///-----------------------------------------------------------------------------
/// Checking VE specific option
@@ -128,5 +122,6 @@
// RUN: %clangxx -### -target ve --stdlib=c++ %s 2>&1 | \
// RUN: FileCheck -check-prefix=LINK %s
-// LINK: clang{{.*}} "-cc1"
-// LINK: nld{{.*}} "{{.*}}/crt1.o" "{{.*}}/crti.o"{{.*}}"crtbegin.o"{{.*}}"-lc++" "-lc++abi" "-lunwind" "-lpthread" "-ldl"
+// LINK: nld"
+// LINK-SAME: "-dynamic-linker" "/opt/nec/ve/lib/ld-linux-ve.so.1"
+// LINK-SAME: "{{[^"]*}}crt1.o" "{{[^"]*}}crti.o"{{.*}}"crtbegin.o"{{.*}}"-lc++" "-lc++abi" "-lunwind" "-lpthread" "-ldl"
More information about the cfe-commits
mailing list