diff options
author | Sam Clegg <sbc@chromium.org> | 2018-05-30 17:57:08 +0000 |
---|---|---|
committer | Sam Clegg <sbc@chromium.org> | 2018-05-30 17:57:08 +0000 |
commit | 3d63a409a00d5bc7365a5483b1a92fff210e1180 (patch) | |
tree | 36198e66cbab9c93edd0f1228fb2d90ae9ef3e8f | |
parent | f4ce54a12390aeaa18ec2b188cb130ea44a8ef14 (diff) | |
download | bcm5719-llvm-3d63a409a00d5bc7365a5483b1a92fff210e1180.tar.gz bcm5719-llvm-3d63a409a00d5bc7365a5483b1a92fff210e1180.zip |
[ELF] Remove -m argument to lld in test files. NFC.
This should be correctly implied by the linker.
This also makes the tests slightly easier to maintain and compare
with the equivalent tests under for other platforms.
Differential Revision: https://reviews.llvm.org/D47513
llvm-svn: 333567
65 files changed, 99 insertions, 98 deletions
diff --git a/lld/test/ELF/lto/Inputs/archive-3.ll b/lld/test/ELF/lto/Inputs/archive-3.ll index ad8fb1e33ef..37442469aa7 100644 --- a/lld/test/ELF/lto/Inputs/archive-3.ll +++ b/lld/test/ELF/lto/Inputs/archive-3.ll @@ -1,5 +1,6 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" + define void @foo() { ret void } diff --git a/lld/test/ELF/lto/Inputs/common3.ll b/lld/test/ELF/lto/Inputs/common3.ll index a4efc659157..8f20a1e8ac2 100644 --- a/lld/test/ELF/lto/Inputs/common3.ll +++ b/lld/test/ELF/lto/Inputs/common3.ll @@ -1,3 +1,4 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" + @a = common hidden global i64 0, align 4 diff --git a/lld/test/ELF/lto/archive-2.ll b/lld/test/ELF/lto/archive-2.ll index 6712d60c11e..28e349ebd31 100644 --- a/lld/test/ELF/lto/archive-2.ll +++ b/lld/test/ELF/lto/archive-2.ll @@ -3,9 +3,9 @@ ; RUN: rm -f %t.a ; RUN: llvm-ar rcs %t.a %t1.o ; RUN: llvm-as %s -o %t2.o -; RUN: ld.lld -m elf_x86_64 %t2.o %t.a -o %t3 +; RUN: ld.lld %t2.o %t.a -o %t3 ; RUN: llvm-readobj -t %t3 | FileCheck %s -; RUN: ld.lld -m elf_x86_64 %t2.o --whole-archive %t.a -o %t3 -shared +; RUN: ld.lld %t2.o --whole-archive %t.a -o %t3 -shared ; RUN: llvm-readobj -t %t3 | FileCheck %s ; CHECK: Name: _start ( diff --git a/lld/test/ELF/lto/archive-3.ll b/lld/test/ELF/lto/archive-3.ll index 0322e412539..fec1b615523 100644 --- a/lld/test/ELF/lto/archive-3.ll +++ b/lld/test/ELF/lto/archive-3.ll @@ -2,12 +2,12 @@ ; RUN: llvm-as %S/Inputs/archive-3.ll -o %t1.o ; RUN: llvm-as %s -o %t2.o -; RUN: ld.lld -m elf_x86_64 %t1.o %t2.o -o %t3 -save-temps +; RUN: ld.lld %t1.o %t2.o -o %t3 -save-temps ; RUN: llvm-dis %t3.0.2.internalize.bc -o - | FileCheck %s ; RUN: rm -f %t.a ; RUN: llvm-ar rcs %t.a %t1.o -; RUN: ld.lld -m elf_x86_64 %t.a %t1.o %t2.o -o %t3 -save-temps +; RUN: ld.lld %t.a %t1.o %t2.o -o %t3 -save-temps ; RUN: llvm-dis %t3.0.2.internalize.bc -o - | FileCheck %s ; CHECK: define internal void @foo() { diff --git a/lld/test/ELF/lto/archive-no-index.ll b/lld/test/ELF/lto/archive-no-index.ll index 48cca0aa079..5ac2628fefd 100644 --- a/lld/test/ELF/lto/archive-no-index.ll +++ b/lld/test/ELF/lto/archive-no-index.ll @@ -11,8 +11,8 @@ ; RUN: llvm-ar crS %t1.a %t2.o ; RUN: llvm-ar crs %t2.a %t2.o -; RUN: ld.lld -o %t -emain -m elf_x86_64 %t1.o %t1.a -; RUN: ld.lld -o %t -emain -m elf_x86_64 %t1.o %t2.a +; RUN: ld.lld -o %t -emain %t1.o %t1.a +; RUN: ld.lld -o %t -emain %t1.o %t2.a target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" diff --git a/lld/test/ELF/lto/archive.ll b/lld/test/ELF/lto/archive.ll index b4d011fdb88..6c4ca5e9aaa 100644 --- a/lld/test/ELF/lto/archive.ll +++ b/lld/test/ELF/lto/archive.ll @@ -3,9 +3,9 @@ ; RUN: rm -f %t.a ; RUN: llvm-ar rcs %t.a %t1.o ; RUN: llvm-as %s -o %t2.o -; RUN: ld.lld -m elf_x86_64 %t2.o %t.a -o %t3 -shared +; RUN: ld.lld %t2.o %t.a -o %t3 -shared ; RUN: llvm-readobj -t %t3 | FileCheck %s -; RUN: ld.lld -m elf_x86_64 %t2.o --whole-archive %t.a -o %t3 -shared +; RUN: ld.lld %t2.o --whole-archive %t.a -o %t3 -shared ; RUN: llvm-readobj -t %t3 | FileCheck %s ; CHECK: Name: g ( diff --git a/lld/test/ELF/lto/asmundef.ll b/lld/test/ELF/lto/asmundef.ll index 677bee6776c..604af8f9380 100644 --- a/lld/test/ELF/lto/asmundef.ll +++ b/lld/test/ELF/lto/asmundef.ll @@ -1,7 +1,7 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o ; RUN: llvm-as %S/Inputs/asmundef.ll -o %t2.o -; RUN: ld.lld -m elf_x86_64 %t.o %t2.o -o %t -save-temps +; RUN: ld.lld %t.o %t2.o -o %t -save-temps ; RUN: llvm-dis %t.0.4.opt.bc -o - | FileCheck %s target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/lld/test/ELF/lto/available-externally.ll b/lld/test/ELF/lto/available-externally.ll index 315e710ec87..516bec8c8a4 100644 --- a/lld/test/ELF/lto/available-externally.ll +++ b/lld/test/ELF/lto/available-externally.ll @@ -1,7 +1,7 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t1.o ; RUN: llvm-as %p/Inputs/available-externally.ll -o %t2.o -; RUN: ld.lld %t1.o %t2.o -m elf_x86_64 -o %t.so -shared -save-temps +; RUN: ld.lld %t1.o %t2.o -o %t.so -shared -save-temps ; RUN: llvm-dis < %t.so.0.2.internalize.bc | FileCheck %s target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/lld/test/ELF/lto/bitcode-nodatalayout.ll b/lld/test/ELF/lto/bitcode-nodatalayout.ll index 5c4883a4244..c99cbb8550f 100644 --- a/lld/test/ELF/lto/bitcode-nodatalayout.ll +++ b/lld/test/ELF/lto/bitcode-nodatalayout.ll @@ -1,6 +1,6 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o -; RUN: not ld.lld -m elf_x86_64 %t.o -o %t 2>&1 | FileCheck %s +; RUN: not ld.lld %t.o -o %t 2>&1 | FileCheck %s ; CHECK: input module has no datalayout diff --git a/lld/test/ELF/lto/codemodel.ll b/lld/test/ELF/lto/codemodel.ll index cc126202f29..995575a9a0a 100644 --- a/lld/test/ELF/lto/codemodel.ll +++ b/lld/test/ELF/lto/codemodel.ll @@ -1,7 +1,7 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o -; RUN: ld.lld -m elf_x86_64 %t.o -o %ts -mllvm -code-model=small -; RUN: ld.lld -m elf_x86_64 %t.o -o %tl -mllvm -code-model=large +; RUN: ld.lld %t.o -o %ts -mllvm -code-model=small +; RUN: ld.lld %t.o -o %tl -mllvm -code-model=large ; RUN: llvm-objdump -d %ts | FileCheck %s --check-prefix=CHECK-SMALL ; RUN: llvm-objdump -d %tl | FileCheck %s --check-prefix=CHECK-LARGE diff --git a/lld/test/ELF/lto/combined-lto-object-name.ll b/lld/test/ELF/lto/combined-lto-object-name.ll index 76564f90c66..e0b98740e0f 100644 --- a/lld/test/ELF/lto/combined-lto-object-name.ll +++ b/lld/test/ELF/lto/combined-lto-object-name.ll @@ -1,6 +1,6 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o -; RUN: not ld.lld -m elf_x86_64 %t.o -o %t2 2>&1 | FileCheck %s +; RUN: not ld.lld %t.o -o %t2 2>&1 | FileCheck %s target triple = "x86_64-unknown-linux-gnu" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/lld/test/ELF/lto/comdat.ll b/lld/test/ELF/lto/comdat.ll index e1384d0abd2..1739351220c 100644 --- a/lld/test/ELF/lto/comdat.ll +++ b/lld/test/ELF/lto/comdat.ll @@ -1,6 +1,6 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o -; RUN: ld.lld -m elf_x86_64 %t.o %t.o -o %t.so -shared +; RUN: ld.lld %t.o %t.o -o %t.so -shared ; RUN: llvm-readobj -t %t.so | FileCheck %s ; CHECK: Name: foo diff --git a/lld/test/ELF/lto/comdat2.ll b/lld/test/ELF/lto/comdat2.ll index 283182155ae..e7c6ea10b5e 100644 --- a/lld/test/ELF/lto/comdat2.ll +++ b/lld/test/ELF/lto/comdat2.ll @@ -1,9 +1,9 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o ; RUN: llvm-mc -triple=x86_64-pc-linux %p/Inputs/comdat.s -o %t2.o -filetype=obj -; RUN: ld.lld -m elf_x86_64 %t.o %t2.o -o %t.so -shared +; RUN: ld.lld %t.o %t2.o -o %t.so -shared ; RUN: llvm-readobj -t %t.so | FileCheck %s -; RUN: ld.lld -m elf_x86_64 %t2.o %t.o -o %t2.so -shared +; RUN: ld.lld %t2.o %t.o -o %t2.so -shared ; RUN: llvm-readobj -t %t2.so | FileCheck %s --check-prefix=OTHER diff --git a/lld/test/ELF/lto/common2.ll b/lld/test/ELF/lto/common2.ll index 2345a203b24..1cb5c322ba0 100644 --- a/lld/test/ELF/lto/common2.ll +++ b/lld/test/ELF/lto/common2.ll @@ -1,6 +1,6 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t1.o -; RUN: ld.lld -m elf_x86_64 %t1.o -o %t -shared -save-temps +; RUN: ld.lld %t1.o -o %t -shared -save-temps ; RUN: llvm-dis < %t.0.2.internalize.bc | FileCheck %s ; RUN: llvm-readobj -t %t | FileCheck %s --check-prefix=SHARED diff --git a/lld/test/ELF/lto/common3.ll b/lld/test/ELF/lto/common3.ll index aea33f443f4..de52615e24f 100644 --- a/lld/test/ELF/lto/common3.ll +++ b/lld/test/ELF/lto/common3.ll @@ -1,7 +1,7 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t1.o ; RUN: llvm-as %S/Inputs/common3.ll -o %t2.o -; RUN: ld.lld -m elf_x86_64 %t1.o %t2.o -o %t -shared -save-temps +; RUN: ld.lld %t1.o %t2.o -o %t -shared -save-temps ; RUN: llvm-dis < %t.0.2.internalize.bc | FileCheck %s target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/lld/test/ELF/lto/ctors.ll b/lld/test/ELF/lto/ctors.ll index 7fce645f28f..f64189711aa 100644 --- a/lld/test/ELF/lto/ctors.ll +++ b/lld/test/ELF/lto/ctors.ll @@ -1,6 +1,6 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o -; RUN: ld.lld -m elf_x86_64 %t.o -o %t.so -shared +; RUN: ld.lld %t.o -o %t.so -shared ; RUN: llvm-readobj -sections %t.so | FileCheck %s target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/lld/test/ELF/lto/discard-value-names.ll b/lld/test/ELF/lto/discard-value-names.ll index f1e95fe7500..485014e94d9 100644 --- a/lld/test/ELF/lto/discard-value-names.ll +++ b/lld/test/ELF/lto/discard-value-names.ll @@ -1,7 +1,7 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o -; RUN: ld.lld -m elf_x86_64 -shared -save-temps %t.o -o %t2.o +; RUN: ld.lld -shared -save-temps %t.o -o %t2.o ; RUN: llvm-dis < %t2.o.0.0.preopt.bc | FileCheck %s ; CHECK: @GlobalValueName diff --git a/lld/test/ELF/lto/drop-debug-info.ll b/lld/test/ELF/lto/drop-debug-info.ll index dae7b96851a..f820faf5d0e 100644 --- a/lld/test/ELF/lto/drop-debug-info.ll +++ b/lld/test/ELF/lto/drop-debug-info.ll @@ -3,7 +3,7 @@ ; drop-debug-info.bc was created from "void f(void) {}" with clang 3.5 and ; -gline-tables-only, so it contains old debug info. ; -; RUN: ld.lld -m elf_x86_64 -shared %p/Inputs/drop-debug-info.bc \ +; RUN: ld.lld -shared %p/Inputs/drop-debug-info.bc \ ; RUN: -disable-verify -o %t 2>&1 | FileCheck %s ; CHECK: ignoring debug info with an invalid version (1) in {{.*}}drop-debug-info.bc diff --git a/lld/test/ELF/lto/drop-linkage.ll b/lld/test/ELF/lto/drop-linkage.ll index 1ff179666f0..f02fa02bc4f 100644 --- a/lld/test/ELF/lto/drop-linkage.ll +++ b/lld/test/ELF/lto/drop-linkage.ll @@ -1,12 +1,12 @@ -target triple = "x86_64-unknown-linux-gnu" -target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" - ; REQUIRES: x86 ; RUN: llc %s -o %t.o -filetype=obj ; RUN: llvm-as %p/Inputs/drop-linkage.ll -o %t2.o ; RUN: ld.lld %t.o %t2.o -o %t.so -save-temps -shared ; RUN: llvm-dis %t.so.0.4.opt.bc -o - | FileCheck %s +target triple = "x86_64-unknown-linux-gnu" +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" + define void @foo() { ret void } diff --git a/lld/test/ELF/lto/duplicated.ll b/lld/test/ELF/lto/duplicated.ll index 156748117a2..fc60fbab23c 100644 --- a/lld/test/ELF/lto/duplicated.ll +++ b/lld/test/ELF/lto/duplicated.ll @@ -1,6 +1,6 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o -; RUN: not ld.lld -m elf_x86_64 %t.o %t.o -o %t.so -shared 2>&1 | FileCheck %s +; RUN: not ld.lld %t.o %t.o -o %t.so -shared 2>&1 | FileCheck %s ; CHECK: duplicate symbol: f ; CHECK-NEXT: >>> defined in {{.*}}.o diff --git a/lld/test/ELF/lto/dynamic-list.ll b/lld/test/ELF/lto/dynamic-list.ll index 0e950b3c83f..c5473d83338 100644 --- a/lld/test/ELF/lto/dynamic-list.ll +++ b/lld/test/ELF/lto/dynamic-list.ll @@ -1,7 +1,7 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o ; RUN: echo "{ foo; };" > %t.list -; RUN: ld.lld -m elf_x86_64 -o %t --dynamic-list %t.list -pie %t.o +; RUN: ld.lld -o %t --dynamic-list %t.list -pie %t.o ; RUN: llvm-readobj -dyn-symbols %t | FileCheck %s ; CHECK: Name: foo@ diff --git a/lld/test/ELF/lto/dynsym.ll b/lld/test/ELF/lto/dynsym.ll index b2b4157820b..d056c0b555e 100644 --- a/lld/test/ELF/lto/dynsym.ll +++ b/lld/test/ELF/lto/dynsym.ll @@ -1,12 +1,12 @@ ; REQUIRES: x86 ; RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux -o %t.o %p/Inputs/dynsym.s -; RUN: ld.lld -m elf_x86_64 %t.o -o %t.so -shared +; RUN: ld.lld %t.o -o %t.so -shared ; RUN: llvm-as %s -o %t2.o -; RUN: ld.lld -m elf_x86_64 %t2.o %t.so -o %t +; RUN: ld.lld %t2.o %t.so -o %t ; RUN: llvm-readobj -dyn-symbols %t | FileCheck %s ; Check that we don't crash when gc'ing sections and printing the result. -; RUN: ld.lld -m elf_x86_64 %t2.o %t.so --gc-sections --print-gc-sections \ +; RUN: ld.lld %t2.o %t.so --gc-sections --print-gc-sections \ ; RUN: -o %t ; RUN: llvm-readobj -dyn-symbols %t | FileCheck %s diff --git a/lld/test/ELF/lto/inline-asm.ll b/lld/test/ELF/lto/inline-asm.ll index b6af6a5a5cb..e0732e6def5 100644 --- a/lld/test/ELF/lto/inline-asm.ll +++ b/lld/test/ELF/lto/inline-asm.ll @@ -1,6 +1,6 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o -; RUN: ld.lld -m elf_x86_64 %t.o -o %t.so -shared +; RUN: ld.lld %t.o -o %t.so -shared target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" diff --git a/lld/test/ELF/lto/internalize-basic.ll b/lld/test/ELF/lto/internalize-basic.ll index b5691a752ab..5197654d588 100644 --- a/lld/test/ELF/lto/internalize-basic.ll +++ b/lld/test/ELF/lto/internalize-basic.ll @@ -1,6 +1,6 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o -; RUN: ld.lld -m elf_x86_64 %t.o -o %t2 -save-temps +; RUN: ld.lld %t.o -o %t2 -save-temps ; RUN: llvm-dis < %t2.0.2.internalize.bc | FileCheck %s target triple = "x86_64-unknown-linux-gnu" diff --git a/lld/test/ELF/lto/internalize-exportdyn.ll b/lld/test/ELF/lto/internalize-exportdyn.ll index 0ffde696edb..7c996e19f35 100644 --- a/lld/test/ELF/lto/internalize-exportdyn.ll +++ b/lld/test/ELF/lto/internalize-exportdyn.ll @@ -1,7 +1,7 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o ; RUN: llvm-as %p/Inputs/internalize-exportdyn.ll -o %t2.o -; RUN: ld.lld -m elf_x86_64 %t.o %t2.o -o %t2 --export-dynamic -save-temps +; RUN: ld.lld %t.o %t2.o -o %t2 --export-dynamic -save-temps ; RUN: llvm-dis < %t2.0.2.internalize.bc | FileCheck %s target triple = "x86_64-unknown-linux-gnu" diff --git a/lld/test/ELF/lto/internalize-llvmused.ll b/lld/test/ELF/lto/internalize-llvmused.ll index 253dcb26d04..7e3d867da59 100644 --- a/lld/test/ELF/lto/internalize-llvmused.ll +++ b/lld/test/ELF/lto/internalize-llvmused.ll @@ -1,6 +1,6 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o -; RUN: ld.lld -m elf_x86_64 %t.o -o %t2 -save-temps +; RUN: ld.lld %t.o -o %t2 -save-temps ; RUN: llvm-dis < %t2.0.2.internalize.bc | FileCheck %s target triple = "x86_64-unknown-linux-gnu" diff --git a/lld/test/ELF/lto/internalize-undef.ll b/lld/test/ELF/lto/internalize-undef.ll index f76528bda3b..c0860d8943b 100644 --- a/lld/test/ELF/lto/internalize-undef.ll +++ b/lld/test/ELF/lto/internalize-undef.ll @@ -1,7 +1,7 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o ; RUN: llvm-as %p/Inputs/internalize-undef.ll -o %t2.o -; RUN: ld.lld -m elf_x86_64 %t.o %t2.o -o %t -save-temps +; RUN: ld.lld %t.o %t2.o -o %t -save-temps ; RUN: llvm-dis < %t.0.2.internalize.bc | FileCheck %s target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/lld/test/ELF/lto/internalize-version-script.ll b/lld/test/ELF/lto/internalize-version-script.ll index c577e43b50e..7e242e1a7ef 100644 --- a/lld/test/ELF/lto/internalize-version-script.ll +++ b/lld/test/ELF/lto/internalize-version-script.ll @@ -1,7 +1,7 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o ; RUN: echo "{ global: foo; local: *; };" > %t.script -; RUN: ld.lld -m elf_x86_64 %t.o -o %t2 -shared --version-script %t.script -save-temps +; RUN: ld.lld %t.o -o %t2 -shared --version-script %t.script -save-temps ; RUN: llvm-dis < %t2.0.2.internalize.bc | FileCheck %s target triple = "x86_64-unknown-linux-gnu" diff --git a/lld/test/ELF/lto/irmover-error.ll b/lld/test/ELF/lto/irmover-error.ll index 8b9836d23ca..d1c962ff725 100644 --- a/lld/test/ELF/lto/irmover-error.ll +++ b/lld/test/ELF/lto/irmover-error.ll @@ -1,6 +1,6 @@ ; RUN: llvm-as -o %t1.bc %s ; RUN: llvm-as -o %t2.bc %S/Inputs/irmover-error.ll -; RUN: not ld.lld -m elf_x86_64 %t1.bc %t2.bc -o %t 2>&1 | FileCheck %s +; RUN: not ld.lld %t1.bc %t2.bc -o %t 2>&1 | FileCheck %s ; CHECK: linking module flags 'foo': IDs have conflicting values diff --git a/lld/test/ELF/lto/keep-undefined.ll b/lld/test/ELF/lto/keep-undefined.ll index cb0f4ce491f..55d2a05b48f 100644 --- a/lld/test/ELF/lto/keep-undefined.ll +++ b/lld/test/ELF/lto/keep-undefined.ll @@ -2,7 +2,7 @@ ; This test checks that symbols which are specified in "-u" switches ; are kept over LTO if we link an executable. ; RUN: llvm-as %s -o %t.o -; RUN: ld.lld -m elf_x86_64 %t.o -o %tout -u foo +; RUN: ld.lld %t.o -o %tout -u foo ; RUN: llvm-nm %tout | FileCheck %s ; CHECK: T foo diff --git a/lld/test/ELF/lto/linkage.ll b/lld/test/ELF/lto/linkage.ll index 5af9b321eee..9b9390002c7 100644 --- a/lld/test/ELF/lto/linkage.ll +++ b/lld/test/ELF/lto/linkage.ll @@ -1,6 +1,6 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t1.o -; RUN: ld.lld -m elf_x86_64 %t1.o %t1.o -o %t.so -shared +; RUN: ld.lld %t1.o %t1.o -o %t.so -shared ; RUN: llvm-nm %t.so | FileCheck %s target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/lld/test/ELF/lto/linker-script-symbols-assign.ll b/lld/test/ELF/lto/linker-script-symbols-assign.ll index 6ca78245a1c..bd7a3740299 100644 --- a/lld/test/ELF/lto/linker-script-symbols-assign.ll +++ b/lld/test/ELF/lto/linker-script-symbols-assign.ll @@ -2,7 +2,7 @@ ; RUN: llvm-as %s -o %t.o ; RUN: echo "foo = 1;" > %t.script -; RUN: ld.lld -m elf_x86_64 %t.o -o %t2 --script %t.script -save-temps +; RUN: ld.lld %t.o -o %t2 --script %t.script -save-temps ; RUN: llvm-readobj -symbols %t2.lto.o | FileCheck %s ; CHECK-NOT: bar @@ -20,7 +20,7 @@ ; VAL-NEXT: } ; RUN: echo "zed = 1;" > %t2.script -; RUN: ld.lld -m elf_x86_64 %t.o -o %t3 --script %t2.script +; RUN: ld.lld %t.o -o %t3 --script %t2.script ; RUN: llvm-readobj -symbols %t3 | FileCheck %s --check-prefix=ABS ; ABS: Symbol { ; ABS: Name: zed diff --git a/lld/test/ELF/lto/linker-script-symbols-ipo.ll b/lld/test/ELF/lto/linker-script-symbols-ipo.ll index 330ac6795ef..4cc95c6caca 100644 --- a/lld/test/ELF/lto/linker-script-symbols-ipo.ll +++ b/lld/test/ELF/lto/linker-script-symbols-ipo.ll @@ -4,7 +4,7 @@ ; RUN: echo "bar = foo;" > %t.script ;; Check that without linkerscript bar is inlined. -; RUN: ld.lld -m elf_x86_64 %t1.o %t2.o -o %t3 -save-temps +; RUN: ld.lld %t1.o %t2.o -o %t3 -save-temps ; RUN: llvm-objdump -d %t3 | FileCheck %s --check-prefix=IPO ; IPO: Disassembly of section .text: ; IPO: _start: @@ -12,7 +12,7 @@ ; IPO-NEXT: 201005: {{.*}} retq ;; Check that LTO does not do IPO for symbols assigned by script. -; RUN: ld.lld -m elf_x86_64 %t1.o %t2.o -o %t4 --script %t.script -save-temps +; RUN: ld.lld %t1.o %t2.o -o %t4 --script %t.script -save-temps ; RUN: llvm-objdump -d %t4 | FileCheck %s --check-prefix=NOIPO ; NOIPO: Disassembly of section .text: ; NOIPO: foo: diff --git a/lld/test/ELF/lto/linker-script-symbols.ll b/lld/test/ELF/lto/linker-script-symbols.ll index c2a58b6e841..28758c05206 100644 --- a/lld/test/ELF/lto/linker-script-symbols.ll +++ b/lld/test/ELF/lto/linker-script-symbols.ll @@ -2,7 +2,7 @@ ; RUN: llvm-as %s -o %t.o ; RUN: echo "foo = bar;" > %t.script -; RUN: ld.lld -m elf_x86_64 %t.o -o %t2 --script %t.script -save-temps +; RUN: ld.lld %t.o -o %t2 --script %t.script -save-temps ; RUN: llvm-readobj -symbols %t2.lto.o | FileCheck %s ; CHECK-NOT: zed diff --git a/lld/test/ELF/lto/lto-start.ll b/lld/test/ELF/lto/lto-start.ll index e93eecfbf03..cc1eb4bd5b0 100644 --- a/lld/test/ELF/lto/lto-start.ll +++ b/lld/test/ELF/lto/lto-start.ll @@ -1,6 +1,6 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o -; RUN: ld.lld -m elf_x86_64 %t.o -o %t2 +; RUN: ld.lld %t.o -o %t2 ; RUN: llvm-readobj -t %t2 | FileCheck %s ; CHECK: Format: ELF64-x86-64 diff --git a/lld/test/ELF/lto/ltopasses-basic.ll b/lld/test/ELF/lto/ltopasses-basic.ll index 0c4ad8b9f17..6789bdc95fe 100644 --- a/lld/test/ELF/lto/ltopasses-basic.ll +++ b/lld/test/ELF/lto/ltopasses-basic.ll @@ -1,6 +1,6 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o -; RUN: ld.lld -m elf_x86_64 %t.o -o %t.so -save-temps -mllvm -debug-pass=Arguments -shared 2>&1 | FileCheck %s --check-prefix=MLLVM +; RUN: ld.lld %t.o -o %t.so -save-temps -mllvm -debug-pass=Arguments -shared 2>&1 | FileCheck %s --check-prefix=MLLVM ; RUN: llvm-dis %t.so.0.4.opt.bc -o - | FileCheck %s target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/lld/test/ELF/lto/ltopasses-custom.ll b/lld/test/ELF/lto/ltopasses-custom.ll index a48959a3299..a75000d5cfd 100644 --- a/lld/test/ELF/lto/ltopasses-custom.ll +++ b/lld/test/ELF/lto/ltopasses-custom.ll @@ -1,8 +1,8 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o -; RUN: ld.lld -m elf_x86_64 %t.o -o %t.so -save-temps --lto-aa-pipeline=basic-aa \ +; RUN: ld.lld %t.o -o %t.so -save-temps --lto-aa-pipeline=basic-aa \ ; RUN: --lto-newpm-passes=ipsccp -shared -; RUN: ld.lld -m elf_x86_64 %t.o -o %t2.so -save-temps --lto-newpm-passes=loweratomic -shared +; RUN: ld.lld %t.o -o %t2.so -save-temps --lto-newpm-passes=loweratomic -shared ; RUN: llvm-dis %t.so.0.4.opt.bc -o - | FileCheck %s ; RUN: llvm-dis %t2.so.0.4.opt.bc -o - | FileCheck %s --check-prefix=ATOMIC diff --git a/lld/test/ELF/lto/metadata.ll b/lld/test/ELF/lto/metadata.ll index 2eaacaae272..238b5bd43b7 100644 --- a/lld/test/ELF/lto/metadata.ll +++ b/lld/test/ELF/lto/metadata.ll @@ -1,6 +1,6 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t1.o -; RUN: ld.lld -m elf_x86_64 %t1.o %t1.o -o %t.so -shared +; RUN: ld.lld %t1.o %t1.o -o %t.so -shared target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" diff --git a/lld/test/ELF/lto/module-asm.ll b/lld/test/ELF/lto/module-asm.ll index 1389b9f5472..eaf27621422 100644 --- a/lld/test/ELF/lto/module-asm.ll +++ b/lld/test/ELF/lto/module-asm.ll @@ -1,6 +1,6 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o -; RUN: ld.lld -m elf_x86_64 %t.o -o %t +; RUN: ld.lld %t.o -o %t ; RUN: llvm-nm %t | FileCheck %s target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/lld/test/ELF/lto/opt-level.ll b/lld/test/ELF/lto/opt-level.ll index fa82b934d8a..5c4ec43a21a 100644 --- a/lld/test/ELF/lto/opt-level.ll +++ b/lld/test/ELF/lto/opt-level.ll @@ -1,30 +1,30 @@ ; REQUIRES: x86 ; RUN: llvm-as -o %t.o %s -; RUN: ld.lld -o %t0 -m elf_x86_64 -e main --lto-O0 %t.o +; RUN: ld.lld -o %t0 -e main --lto-O0 %t.o ; RUN: llvm-nm %t0 | FileCheck --check-prefix=CHECK-O0 %s -; RUN: ld.lld -o %t0 -m elf_x86_64 -e main --plugin-opt=O0 %t.o +; RUN: ld.lld -o %t0 -e main --plugin-opt=O0 %t.o ; RUN: llvm-nm %t0 | FileCheck --check-prefix=CHECK-O0 %s -; RUN: ld.lld -o %t2 -m elf_x86_64 -e main --lto-O2 %t.o +; RUN: ld.lld -o %t2 -e main --lto-O2 %t.o ; RUN: llvm-nm %t2 | FileCheck --check-prefix=CHECK-O2 %s -; RUN: ld.lld -o %t2a -m elf_x86_64 -e main %t.o +; RUN: ld.lld -o %t2a -e main %t.o ; RUN: llvm-nm %t2a | FileCheck --check-prefix=CHECK-O2 %s -; RUN: ld.lld -o %t2 -m elf_x86_64 -e main %t.o --plugin-opt O2 +; RUN: ld.lld -o %t2 -e main %t.o --plugin-opt O2 ; RUN: llvm-nm %t2 | FileCheck --check-prefix=CHECK-O2 %s ; Reject invalid optimization levels. -; RUN: not ld.lld -o %t3 -m elf_x86_64 -e main --lto-O6 %t.o 2>&1 | \ +; RUN: not ld.lld -o %t3 -e main --lto-O6 %t.o 2>&1 | \ ; RUN: FileCheck --check-prefix=INVALID1 %s ; INVALID1: invalid optimization level for LTO: 6 -; RUN: not ld.lld -o %t3 -m elf_x86_64 -e main --plugin-opt=O6 %t.o 2>&1 | \ +; RUN: not ld.lld -o %t3 -e main --plugin-opt=O6 %t.o 2>&1 | \ ; RUN: FileCheck --check-prefix=INVALID1 %s -; RUN: not ld.lld -o %t3 -m elf_x86_64 -e main --plugin-opt=Ofoo %t.o 2>&1 | \ +; RUN: not ld.lld -o %t3 -e main --plugin-opt=Ofoo %t.o 2>&1 | \ ; RUN: FileCheck --check-prefix=INVALID2 %s ; INVALID2: --plugin-opt=Ofoo: number expected, but got 'foo' -; RUN: not ld.lld -o %t3 -m elf_x86_64 -e main --lto-O-1 %t.o 2>&1 | \ +; RUN: not ld.lld -o %t3 -e main --lto-O-1 %t.o 2>&1 | \ ; RUN: FileCheck --check-prefix=INVALIDNEGATIVE1 %s ; INVALIDNEGATIVE1: invalid optimization level for LTO: 4294967295 -; RUN: not ld.lld -o %t3 -m elf_x86_64 -e main --plugin-opt=O-1 %t.o 2>&1 | \ +; RUN: not ld.lld -o %t3 -e main --plugin-opt=O-1 %t.o 2>&1 | \ ; RUN: FileCheck --check-prefix=INVALIDNEGATIVE2 %s ; INVALIDNEGATIVE2: invalid optimization level for LTO: 4294967295 diff --git a/lld/test/ELF/lto/parallel-internalize.ll b/lld/test/ELF/lto/parallel-internalize.ll index 0678de4956f..f21b3ccd29e 100644 --- a/lld/test/ELF/lto/parallel-internalize.ll +++ b/lld/test/ELF/lto/parallel-internalize.ll @@ -1,7 +1,7 @@ ; REQUIRES: x86 ; RUN: llvm-as -o %t.bc %s ; RUN: rm -f %t.lto.o %t1.lto.o -; RUN: ld.lld -m elf_x86_64 --lto-partitions=2 -save-temps -o %t %t.bc \ +; RUN: ld.lld --lto-partitions=2 -save-temps -o %t %t.bc \ ; RUN: -e foo --lto-O0 ; RUN: llvm-readobj -t -dyn-symbols %t | FileCheck %s ; RUN: llvm-nm %t.lto.o | FileCheck --check-prefix=CHECK0 %s diff --git a/lld/test/ELF/lto/parallel.ll b/lld/test/ELF/lto/parallel.ll index a1c15af380f..4ba3fd69d52 100644 --- a/lld/test/ELF/lto/parallel.ll +++ b/lld/test/ELF/lto/parallel.ll @@ -1,7 +1,7 @@ ; REQUIRES: x86 ; RUN: llvm-as -o %t.bc %s ; RUN: rm -f %t.lto.o %t1.lto.o -; RUN: ld.lld -m elf_x86_64 --lto-partitions=2 -save-temps -o %t %t.bc -shared +; RUN: ld.lld --lto-partitions=2 -save-temps -o %t %t.bc -shared ; RUN: llvm-nm %t.lto.o | FileCheck --check-prefix=CHECK0 %s ; RUN: llvm-nm %t1.lto.o | FileCheck --check-prefix=CHECK1 %s diff --git a/lld/test/ELF/lto/relax-relocs.ll b/lld/test/ELF/lto/relax-relocs.ll index 8e8d9d16578..80e5dac77d8 100644 --- a/lld/test/ELF/lto/relax-relocs.ll +++ b/lld/test/ELF/lto/relax-relocs.ll @@ -1,6 +1,6 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o -; RUN: ld.lld -m elf_x86_64 -save-temps -shared %t.o -o %t.so +; RUN: ld.lld -save-temps -shared %t.o -o %t.so ; RUN: llvm-readobj -r %t.so.lto.o | FileCheck %s ; Test that we produce R_X86_64_REX_GOTPCRELX instead of R_X86_64_GOTPCREL diff --git a/lld/test/ELF/lto/save-temps.ll b/lld/test/ELF/lto/save-temps.ll index c8e52ff4b4e..b34134cc5d7 100644 --- a/lld/test/ELF/lto/save-temps.ll +++ b/lld/test/ELF/lto/save-temps.ll @@ -3,7 +3,7 @@ ; RUN: rm -f a.out a.out.lto.bc a.out.lto.o ; RUN: llvm-as %s -o %t.o ; RUN: llvm-as %p/Inputs/save-temps.ll -o %t2.o -; RUN: ld.lld -shared -m elf_x86_64 %t.o %t2.o -save-temps +; RUN: ld.lld -shared %t.o %t2.o -save-temps ; RUN: llvm-nm a.out | FileCheck %s ; RUN: llvm-nm a.out.0.0.preopt.bc | FileCheck %s ; RUN: llvm-nm a.out.lto.o | FileCheck %s diff --git a/lld/test/ELF/lto/start-lib.ll b/lld/test/ELF/lto/start-lib.ll index ec73954a80c..024d887a7d0 100644 --- a/lld/test/ELF/lto/start-lib.ll +++ b/lld/test/ELF/lto/start-lib.ll @@ -4,17 +4,17 @@ ; RUN: llvm-as %p/Inputs/start-lib1.ll -o %t2.o ; RUN: llvm-as %p/Inputs/start-lib2.ll -o %t3.o ; -; RUN: ld.lld -m elf_x86_64 -shared -o %t3 %t1.o %t2.o %t3.o +; RUN: ld.lld -shared -o %t3 %t1.o %t2.o %t3.o ; RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=TEST1 %s ; TEST1: Name: bar ; TEST1: Name: foo ; -; RUN: ld.lld -m elf_x86_64 -shared -o %t3 -u bar %t1.o --start-lib %t2.o %t3.o +; RUN: ld.lld -shared -o %t3 -u bar %t1.o --start-lib %t2.o %t3.o ; RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=TEST2 %s ; TEST2: Name: bar ; TEST2-NOT: Name: foo ; -; RUN: ld.lld -m elf_x86_64 -shared -o %t3 %t1.o --start-lib %t2.o %t3.o +; RUN: ld.lld -shared -o %t3 %t1.o --start-lib %t2.o %t3.o ; RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=TEST3 %s ; TEST3-NOT: Name: bar ; TEST3-NOT: Name: foo diff --git a/lld/test/ELF/lto/thinlto-cant-write-index.ll b/lld/test/ELF/lto/thinlto-cant-write-index.ll index 3e670851543..94f2a45c274 100644 --- a/lld/test/ELF/lto/thinlto-cant-write-index.ll +++ b/lld/test/ELF/lto/thinlto-cant-write-index.ll @@ -8,7 +8,7 @@ ; RUN: rm -f %t2.o.thinlto.bc ; RUN: touch %t2.o.thinlto.bc ; RUN: chmod 400 %t2.o.thinlto.bc -; RUN: not ld.lld -m elf_x86_64 --plugin-opt=thinlto-index-only -shared %t1.o %t2.o -o %t3 2>&1 | FileCheck %s +; RUN: not ld.lld --plugin-opt=thinlto-index-only -shared %t1.o %t2.o -o %t3 2>&1 | FileCheck %s ; CHECK: cannot open {{.*}}2.o.thinlto.bc: {{P|p}}ermission denied target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/lld/test/ELF/lto/thinlto-emit-imports.ll b/lld/test/ELF/lto/thinlto-emit-imports.ll index 3dc854287f4..cae7922682b 100644 --- a/lld/test/ELF/lto/thinlto-emit-imports.ll +++ b/lld/test/ELF/lto/thinlto-emit-imports.ll @@ -31,14 +31,14 @@ ; RUN: rm -f %t3.o.imports ; RUN: touch %t3.o.imports ; RUN: chmod 400 %t3.o.imports -; RUN: not ld.lld -m elf_x86_64 --plugin-opt=thinlto-index-only --plugin-opt=thinlto-emit-imports-files -shared %t1.o %t2.o %t3.o -o %t4 2>&1 | FileCheck %s --check-prefix=ERR +; RUN: not ld.lld --plugin-opt=thinlto-index-only --plugin-opt=thinlto-emit-imports-files -shared %t1.o %t2.o %t3.o -o %t4 2>&1 | FileCheck %s --check-prefix=ERR ; ERR: cannot open {{.*}}3.o.imports: {{P|p}}ermission denied ; Ensure lld doesn't generate import files when thinlto-index-only is not enabled ; RUN: rm -f %t1.o.imports ; RUN: rm -f %t2.o.imports ; RUN: rm -f %t3.o.imports -; RUN: ld.lld -m elf_x86_64 --plugin-opt=thinlto-emit-imports-files -shared %t1.o %t2.o %t3.o -o %t4 +; RUN: ld.lld --plugin-opt=thinlto-emit-imports-files -shared %t1.o %t2.o %t3.o -o %t4 ; RUN: not ls %t1.o.imports ; RUN: not ls %t2.o.imports ; RUN: not ls %t3.o.imports diff --git a/lld/test/ELF/lto/thinlto-index-file.ll b/lld/test/ELF/lto/thinlto-index-file.ll index 47fe3d353e0..91f0b298ca3 100644 --- a/lld/test/ELF/lto/thinlto-index-file.ll +++ b/lld/test/ELF/lto/thinlto-index-file.ll @@ -6,7 +6,7 @@ ; RUN: opt -module-summary %p/Inputs/thinlto_empty.ll -o %t3.o ; Ensure lld writes linked files to linked objects file -; RUN: ld.lld -m elf_x86_64 --plugin-opt=thinlto-index-only=%t.idx -shared %t1.o %t2.o %t3.o -o %t4 +; RUN: ld.lld --plugin-opt=thinlto-index-only=%t.idx -shared %t1.o %t2.o %t3.o -o %t4 ; RUN: FileCheck %s < %t.idx ; CHECK: {{.*}}thinlto-index-file.ll.tmp1.o ; CHECK: {{.*}}thinlto-index-file.ll.tmp2.o diff --git a/lld/test/ELF/lto/thinlto-index-only.ll b/lld/test/ELF/lto/thinlto-index-only.ll index be26f25fa0c..dba2fbc7782 100644 --- a/lld/test/ELF/lto/thinlto-index-only.ll +++ b/lld/test/ELF/lto/thinlto-index-only.ll @@ -5,10 +5,10 @@ ; RUN: llvm-as %s -o %t1.o ; RUN: llvm-as %p/Inputs/thinlto.ll -o %t2.o ; RUN: rm -f %t3 -; RUN: ld.lld -m elf_x86_64 --plugin-opt=thinlto-index-only -shared %t1.o %t2.o -o %t3 +; RUN: ld.lld --plugin-opt=thinlto-index-only -shared %t1.o %t2.o -o %t3 ; RUN: ls %t2.o.thinlto.bc ; RUN: not test -e %t3 -; RUN: ld.lld -m elf_x86_64 -shared %t1.o %t2.o -o %t3 +; RUN: ld.lld -shared %t1.o %t2.o -o %t3 ; RUN: llvm-nm %t3 | FileCheck %s --check-prefix=NM ; Basic ThinLTO tests. @@ -18,14 +18,14 @@ ; Ensure lld generates an index and not a binary if requested. ; RUN: rm -f %t4 -; RUN: ld.lld -m elf_x86_64 --plugin-opt=thinlto-index-only -shared %t1.o %t2.o -o %t4 +; RUN: ld.lld --plugin-opt=thinlto-index-only -shared %t1.o %t2.o -o %t4 ; RUN: llvm-bcanalyzer -dump %t1.o.thinlto.bc | FileCheck %s --check-prefix=BACKEND1 ; RUN: llvm-bcanalyzer -dump %t2.o.thinlto.bc | FileCheck %s --check-prefix=BACKEND2 ; RUN: not test -e %t4 ; Ensure lld generates an index even if the file is wrapped in --start-lib/--end-lib ; RUN: rm -f %t2.o.thinlto.bc %t4 -; RUN: ld.lld -m elf_x86_64 --plugin-opt=thinlto-index-only -shared %t1.o %t3.o --start-lib %t2.o --end-lib -o %t4 +; RUN: ld.lld --plugin-opt=thinlto-index-only -shared %t1.o %t3.o --start-lib %t2.o --end-lib -o %t4 ; RUN: ls %t2.o.thinlto.bc ; RUN: not test -e %t4 diff --git a/lld/test/ELF/lto/thinlto-no-index.ll b/lld/test/ELF/lto/thinlto-no-index.ll index 66193bf395d..f80cf0e6381 100644 --- a/lld/test/ELF/lto/thinlto-no-index.ll +++ b/lld/test/ELF/lto/thinlto-no-index.ll @@ -7,7 +7,7 @@ ; Ensure lld doesn't generates index files when thinlto-index-only is not enabled ; RUN: rm -f %t1.o.thinlto.bc %t2.o.thinlto.bc %t3.o.thinlto.bc -; RUN: ld.lld -m elf_x86_64 -shared %t1.o %t2.o %t3.o -o %t4 +; RUN: ld.lld -shared %t1.o %t2.o %t3.o -o %t4 ; RUN: not ls %t1.o.thinlto.bc ; RUN: not ls %t2.o.thinlto.bc ; RUN: not ls %t3.o.thinlto.bc diff --git a/lld/test/ELF/lto/thinlto-object-suffix-replace.ll b/lld/test/ELF/lto/thinlto-object-suffix-replace.ll index 3ee492d54ca..05ce942c70f 100644 --- a/lld/test/ELF/lto/thinlto-object-suffix-replace.ll +++ b/lld/test/ELF/lto/thinlto-object-suffix-replace.ll @@ -9,7 +9,7 @@ ; First perform the thin link on the normal bitcode file, and save the ; resulting index. -; RUN: ld.lld -m elf_x86_64 --plugin-opt=thinlto-index-only -shared %t1.o -o %t3 +; RUN: ld.lld --plugin-opt=thinlto-index-only -shared %t1.o -o %t3 ; RUN: cp %t1.o.thinlto.bc %t1.o.thinlto.bc.orig ; Next perform the thin link on the minimized bitcode file, and compare dump @@ -17,21 +17,21 @@ ; RUN: rm -f %t1.o.thinlto.bc ; Make sure it isn't inadvertently using the regular bitcode file. ; RUN: rm -f %t1.o -; RUN: ld.lld -m elf_x86_64 --plugin-opt=thinlto-index-only \ +; RUN: ld.lld --plugin-opt=thinlto-index-only \ ; RUN: --plugin-opt=thinlto-object-suffix-replace=".thinlink.bc;.o" \ ; RUN: -shared %t1.thinlink.bc -o %t3 ; RUN: diff %t1.o.thinlto.bc.orig %t1.o.thinlto.bc ; Ensure lld generates error if object suffix replace option does not have 'old;new' format ; RUN: rm -f %t1.o.thinlto.bc -; RUN: not ld.lld -m elf_x86_64 --plugin-opt=thinlto-index-only \ +; RUN: not ld.lld --plugin-opt=thinlto-index-only \ ; RUN: --plugin-opt=thinlto-object-suffix-replace="abc:def" -shared %t1.thinlink.bc \ ; RUN: -o %t3 2>&1 | FileCheck %s --check-prefix=ERR1 ; ERR1: --plugin-opt=thinlto-object-suffix-replace= expects 'old;new' format, but got abc:def ; Ensure lld generates error if old suffix doesn't exist in file name ; RUN: rm -f %t1.o -; RUN: not ld.lld -m elf_x86_64 --plugin-opt=thinlto-index-only \ +; RUN: not ld.lld --plugin-opt=thinlto-index-only \ ; RUN: --plugin-opt=thinlto-object-suffix-replace=".abc;.o" -shared %t1.thinlink.bc \ ; RUN: -o %t3 2>&1 | FileCheck %s --check-prefix=ERR2 ; ERR2: error: -thinlto-object-suffix-replace=.abc;.o was given, but {{.*}} does not end with the suffix diff --git a/lld/test/ELF/lto/tls-mixed.ll b/lld/test/ELF/lto/tls-mixed.ll index 524bb4fb44a..9d5a6930372 100644 --- a/lld/test/ELF/lto/tls-mixed.ll +++ b/lld/test/ELF/lto/tls-mixed.ll @@ -1,7 +1,7 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t1.o ; RUN: llvm-mc %p/Inputs/tls-mixed.s -o %t2.o -filetype=obj -triple=x86_64-pc-linux -; RUN: ld.lld -m elf_x86_64 %t1.o %t2.o -o %t.so -shared +; RUN: ld.lld %t1.o %t2.o -o %t.so -shared target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" diff --git a/lld/test/ELF/lto/tls-preserve.ll b/lld/test/ELF/lto/tls-preserve.ll index 8aebcb783f4..c9b7675cd22 100644 --- a/lld/test/ELF/lto/tls-preserve.ll +++ b/lld/test/ELF/lto/tls-preserve.ll @@ -1,7 +1,7 @@ ; TLS attribute needs to be preserved. ; REQUIRES: x86 ; RUN: llvm-as %s -o %t1.o -; RUN: ld.lld -shared %t1.o -m elf_x86_64 -o %t1 +; RUN: ld.lld -shared %t1.o -o %t1 ; RUN: llvm-readobj -t %t1 | FileCheck %s target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/lld/test/ELF/lto/type-merge.ll b/lld/test/ELF/lto/type-merge.ll index d6f196d7c3b..985c44b796e 100644 --- a/lld/test/ELF/lto/type-merge.ll +++ b/lld/test/ELF/lto/type-merge.ll @@ -1,7 +1,7 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o ; RUN: llvm-as %p/Inputs/type-merge.ll -o %t2.o -; RUN: ld.lld -m elf_x86_64 %t.o %t2.o -o %t -shared -save-temps +; RUN: ld.lld %t.o %t2.o -o %t -shared -save-temps ; RUN: llvm-dis < %t.0.0.preopt.bc | FileCheck %s target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/lld/test/ELF/lto/type-merge2.ll b/lld/test/ELF/lto/type-merge2.ll index 6ebbf778dd8..5944be7e6c0 100644 --- a/lld/test/ELF/lto/type-merge2.ll +++ b/lld/test/ELF/lto/type-merge2.ll @@ -1,7 +1,7 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o ; RUN: llvm-as %p/Inputs/type-merge2.ll -o %t2.o -; RUN: ld.lld -m elf_x86_64 %t.o %t2.o -o %t.so -shared -save-temps +; RUN: ld.lld %t.o %t2.o -o %t.so -shared -save-temps ; RUN: llvm-dis %t.so.0.0.preopt.bc -o - | FileCheck %s target triple = "x86_64-unknown-linux-gnu" diff --git a/lld/test/ELF/lto/undef-weak.ll b/lld/test/ELF/lto/undef-weak.ll index 215978a73df..e090f5653a0 100644 --- a/lld/test/ELF/lto/undef-weak.ll +++ b/lld/test/ELF/lto/undef-weak.ll @@ -1,13 +1,12 @@ ; REQUIRES: x86 - ; RUN: llvm-as %S/Inputs/archive.ll -o %t1.o ; RUN: rm -f %t.a ; RUN: llvm-ar rcs %t.a %t1.o - ; RUN: llvm-as %s -o %t2.o -; RUN: ld.lld -m elf_x86_64 %t2.o -o %t2.so %t.a -shared +; RUN: ld.lld %t2.o -o %t2.so %t.a -shared ; RUN: llvm-readobj -t %t2.so | FileCheck %s + target triple = "x86_64-unknown-linux-gnu" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/lld/test/ELF/lto/undef.ll b/lld/test/ELF/lto/undef.ll index 41da6105229..4ea7e833df1 100644 --- a/lld/test/ELF/lto/undef.ll +++ b/lld/test/ELF/lto/undef.ll @@ -1,6 +1,6 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o -; RUN: ld.lld -m elf_x86_64 %t.o -o %t.so -shared +; RUN: ld.lld %t.o -o %t.so -shared ; RUN: llvm-readobj -t %t.so | FileCheck %s target triple = "x86_64-unknown-linux-gnu" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/lld/test/ELF/lto/undefined-puts.ll b/lld/test/ELF/lto/undefined-puts.ll index d13630368de..6c3dc76be12 100644 --- a/lld/test/ELF/lto/undefined-puts.ll +++ b/lld/test/ELF/lto/undefined-puts.ll @@ -2,7 +2,7 @@ ; RUN: llvm-mc %p/Inputs/shared.s -o %t1.o -filetype=obj -triple=x86_64-unknown-linux ; RUN: ld.lld %t1.o -o %t1.so -shared ; RUN: llvm-as %s -o %t2.o -; RUN: ld.lld %t1.so %t2.o -m elf_x86_64 -o %t +; RUN: ld.lld %t1.so %t2.o -o %t ; RUN: llvm-readobj -dyn-symbols -dyn-relocations %t | FileCheck %s target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/lld/test/ELF/lto/unnamed-addr-comdat.ll b/lld/test/ELF/lto/unnamed-addr-comdat.ll index 29a59415851..38b08ab23ee 100644 --- a/lld/test/ELF/lto/unnamed-addr-comdat.ll +++ b/lld/test/ELF/lto/unnamed-addr-comdat.ll @@ -1,6 +1,6 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o -; RUN: ld.lld -m elf_x86_64 %t.o %t.o -o %t.so -save-temps -shared +; RUN: ld.lld %t.o %t.o -o %t.so -save-temps -shared ; RUN: llvm-dis %t.so.0.2.internalize.bc -o - | FileCheck %s target triple = "x86_64-unknown-linux-gnu" diff --git a/lld/test/ELF/lto/unnamed-addr-drop.ll b/lld/test/ELF/lto/unnamed-addr-drop.ll index e827cbb435e..ad662b7fe7b 100644 --- a/lld/test/ELF/lto/unnamed-addr-drop.ll +++ b/lld/test/ELF/lto/unnamed-addr-drop.ll @@ -1,7 +1,7 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t1.o ; RUN: llvm-as %S/Inputs/unnamed-addr-drop.ll -o %t2.o -; RUN: ld.lld -m elf_x86_64 %t1.o %t2.o -o %t.so -save-temps -shared +; RUN: ld.lld %t1.o %t2.o -o %t.so -save-temps -shared ; RUN: llvm-dis %t.so.0.2.internalize.bc -o - | FileCheck %s target triple = "x86_64-unknown-linux-gnu" diff --git a/lld/test/ELF/lto/unnamed-addr-lib.ll b/lld/test/ELF/lto/unnamed-addr-lib.ll index c2bc6016efd..0c47468e6b4 100644 --- a/lld/test/ELF/lto/unnamed-addr-lib.ll +++ b/lld/test/ELF/lto/unnamed-addr-lib.ll @@ -2,7 +2,7 @@ ; RUN: llvm-as %s -o %t.o ; RUN: llvm-mc %p/Inputs/unnamed-addr-lib.s -o %t2.o -filetype=obj -triple=x86_64-pc-linux ; RUN: ld.lld %t2.o -shared -o %t2.so -; RUN: ld.lld -m elf_x86_64 %t.o %t2.so -o %t.so -save-temps -shared +; RUN: ld.lld %t.o %t2.so -o %t.so -save-temps -shared ; RUN: llvm-dis %t.so.0.2.internalize.bc -o - | FileCheck %s ; This documents a small limitation of lld's internalization logic. We decide diff --git a/lld/test/ELF/lto/unnamed-addr.ll b/lld/test/ELF/lto/unnamed-addr.ll index 56fe148b099..7504fdf6733 100644 --- a/lld/test/ELF/lto/unnamed-addr.ll +++ b/lld/test/ELF/lto/unnamed-addr.ll @@ -1,6 +1,6 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o -; RUN: ld.lld -m elf_x86_64 %t.o -o %t.so -save-temps -shared +; RUN: ld.lld %t.o -o %t.so -save-temps -shared ; RUN: llvm-dis %t.so.0.4.opt.bc -o - | FileCheck %s target triple = "x86_64-unknown-linux-gnu" diff --git a/lld/test/ELF/lto/verify-invalid.ll b/lld/test/ELF/lto/verify-invalid.ll index e6138a3cca6..9fa0f9e0b5f 100644 --- a/lld/test/ELF/lto/verify-invalid.ll +++ b/lld/test/ELF/lto/verify-invalid.ll @@ -1,10 +1,10 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o -; RUN: ld.lld -m elf_x86_64 %t.o -o %t2 -mllvm -debug-pass=Arguments \ +; RUN: ld.lld %t.o -o %t2 -mllvm -debug-pass=Arguments \ ; RUN: 2>&1 | FileCheck -check-prefix=DEFAULT %s -; RUN: ld.lld -m elf_x86_64 %t.o -o %t2 -mllvm -debug-pass=Arguments \ +; RUN: ld.lld %t.o -o %t2 -mllvm -debug-pass=Arguments \ ; RUN: -disable-verify 2>&1 | FileCheck -check-prefix=DISABLE %s -; RUN: ld.lld -m elf_x86_64 %t.o -o %t2 -mllvm -debug-pass=Arguments \ +; RUN: ld.lld %t.o -o %t2 -mllvm -debug-pass=Arguments \ ; RUN: --plugin-opt=disable-verify 2>&1 | FileCheck -check-prefix=DISABLE %s target triple = "x86_64-unknown-linux-gnu" diff --git a/lld/test/ELF/lto/version-script.ll b/lld/test/ELF/lto/version-script.ll index c43b443ff74..35a36b5a8d7 100644 --- a/lld/test/ELF/lto/version-script.ll +++ b/lld/test/ELF/lto/version-script.ll @@ -1,7 +1,7 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o ; RUN: echo "VERSION_1.0{ global: foo; local: *; }; VERSION_2.0{ global: bar; local: *; };" > %t.script -; RUN: ld.lld -m elf_x86_64 %t.o -o %t2 -shared --version-script %t.script -save-temps +; RUN: ld.lld %t.o -o %t2 -shared --version-script %t.script -save-temps ; RUN: llvm-dis < %t2.0.0.preopt.bc | FileCheck %s ; RUN: llvm-readobj -V -dyn-symbols %t2 | FileCheck --check-prefix=DSO %s diff --git a/lld/test/ELF/lto/weak.ll b/lld/test/ELF/lto/weak.ll index 381ef7a1a34..a807c1325db 100644 --- a/lld/test/ELF/lto/weak.ll +++ b/lld/test/ELF/lto/weak.ll @@ -1,6 +1,6 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o -; RUN: ld.lld -m elf_x86_64 %t.o %t.o -o %t.so -shared +; RUN: ld.lld %t.o %t.o -o %t.so -shared ; RUN: llvm-readobj -t %t.so | FileCheck %s target triple = "x86_64-unknown-linux-gnu" |