[PATCH] D43410: Do not automatically append --full-shutdown to lld tests.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 16 14:15:13 PST 2018


ruiu created this revision.
ruiu added a reviewer: rafael.
Herald added subscribers: delcypher, aheejin, kristof.beyls, arichardson, emaste.

I don't think appending "--full-shtudown" to every invocation of ld.lld
in the test suit doesn't make much sense. We havne't caught any errors
by doing that, and that's perhaps rather harmful from the testing point
of view because users are using ld.lld without "--full-shutdown" option.
So this patch I removed that rule.

I added one test so that ld.lld to make sure that ld.lld works with
"--full-shutdown".


https://reviews.llvm.org/D43410

Files:
  lld/test/ELF/full-shutdown.s
  lld/test/ELF/lto/timepasses.ll
  llvm/utils/lit/lit/llvm/config.py


Index: llvm/utils/lit/lit/llvm/config.py
===================================================================
--- llvm/utils/lit/lit/llvm/config.py
+++ llvm/utils/lit/lit/llvm/config.py
@@ -465,9 +465,6 @@
         self.with_environment('PATH', tool_dirs, append_path=True)
         self.with_environment('LD_LIBRARY_PATH', lib_dirs, append_path=True)
 
-        self.config.substitutions.append(
-            (r"\bld.lld\b", 'ld.lld --full-shutdown'))
-
-        tool_patterns = ['ld.lld', 'lld-link', 'lld']
+        tool_patterns = ['ld.lld', 'lld-link', 'ld64.lld', 'ld-wasm', 'lld']
 
         self.add_tool_substitutions(tool_patterns, tool_dirs)
Index: lld/test/ELF/lto/timepasses.ll
===================================================================
--- lld/test/ELF/lto/timepasses.ll
+++ lld/test/ELF/lto/timepasses.ll
@@ -1,8 +1,6 @@
-; We use lld -flavor gnu because llvm-lit will append --full-shutdown to
-; the ld.lld invocation.
 ; REQUIRES: x86
 ; RUN: llvm-as %s -o %t.o
-; RUN: lld -flavor gnu %t.o -o %t.so -shared -mllvm -time-passes 2>&1 | FileCheck %s
+; RUN: ld.lld %t.o -o %t.so -shared -mllvm -time-passes 2>&1 | FileCheck %s
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
Index: lld/test/ELF/full-shutdown.s
===================================================================
--- /dev/null
+++ lld/test/ELF/full-shutdown.s
@@ -0,0 +1,7 @@
+// REQUIRES: x86
+// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
+// RUN: ld.lld %t.o -o %t.exe --full-shutdown
+
+.global _start
+_start:
+  ret


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43410.134719.patch
Type: text/x-patch
Size: 1590 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180216/65ebe0ab/attachment.bin>


More information about the llvm-commits mailing list