diff --git a/lld/test/MachO/alignment-too-large.yaml b/lld/test/MachO/alignment-too-large.yaml --- a/lld/test/MachO/alignment-too-large.yaml +++ b/lld/test/MachO/alignment-too-large.yaml @@ -1,5 +1,5 @@ # RUN: yaml2obj %s -o %t.o -# RUN: not lld -flavor darwinnew -o %t %t.o 2>&1 | FileCheck %s +# RUN: not %lld -o %t %t.o 2>&1 | FileCheck %s # # CHECK: alignment 32 of section __text is too large --- !mach-o diff --git a/lld/test/MachO/arch.s b/lld/test/MachO/arch.s --- a/lld/test/MachO/arch.s +++ b/lld/test/MachO/arch.s @@ -1,7 +1,7 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-darwin %s -o %t.o -# RUN: lld -flavor darwinnew -arch x86_64 -o /dev/null %t.o -# RUN: not lld -flavor darwinnew -arch i386 -o /dev/null %t.o 2>&1 | FileCheck %s +# RUN: %lld -arch x86_64 -o /dev/null %t.o +# RUN: not %lld -arch i386 -o /dev/null %t.o 2>&1 | FileCheck %s # CHECK: missing or unsupported -arch i386 .text diff --git a/lld/test/MachO/duplicate-symbol.s b/lld/test/MachO/duplicate-symbol.s --- a/lld/test/MachO/duplicate-symbol.s +++ b/lld/test/MachO/duplicate-symbol.s @@ -1,7 +1,7 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t-dup.o -# RUN: not lld -flavor darwinnew -o /dev/null %t-dup.o %t.o 2>&1 | FileCheck %s +# RUN: not %lld -o /dev/null %t-dup.o %t.o 2>&1 | FileCheck %s # CHECK: duplicate symbol: _main diff --git a/lld/test/MachO/dylib.s b/lld/test/MachO/dylib.s --- a/lld/test/MachO/dylib.s +++ b/lld/test/MachO/dylib.s @@ -1,14 +1,13 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o -# RUN: lld -flavor darwinnew -dylib -install_name @executable_path/libfoo.dylib \ -# RUN: %t.o -o %t.dylib +# RUN: %lld -dylib -install_name @executable_path/libfoo.dylib %t.o -o %t.dylib # CHECK: cmd: LC_ID_DYLIB # CHECK-NOT: cmd: # CHECK: PayloadString: '@executable_path/libfoo.dylib' ## Check that -e is a no-op when -dylib is also passed. -# RUN: lld -flavor darwinnew -dylib %t.o -o %t.dylib -e missing_entry +# RUN: %lld -dylib %t.o -o %t.dylib -e missing_entry # RUN: obj2yaml %t.dylib | FileCheck %s -DOUTPUT=%t.dylib --check-prefix=DEFAULT-INSTALL-NAME # DEFAULT-INSTALL-NAME: cmd: LC_ID_DYLIB # DEFAULT-INSTALL-NAME-NOT: cmd: diff --git a/lld/test/MachO/dylink.s b/lld/test/MachO/dylink.s --- a/lld/test/MachO/dylink.s +++ b/lld/test/MachO/dylink.s @@ -4,12 +4,12 @@ # RUN: -o %t/libhello.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %p/Inputs/libgoodbye.s \ # RUN: -o %t/libgoodbye.o -# RUN: lld -flavor darwinnew -dylib -install_name \ -# RUN: @executable_path/libhello.dylib %t/libhello.o -o %t/libhello.dylib -# RUN: lld -flavor darwinnew -dylib -install_name \ -# RUN: @executable_path/libgoodbye.dylib %t/libgoodbye.o -o %t/libgoodbye.dylib +# RUN: %lld -dylib -install_name @executable_path/libhello.dylib \ +# RUN: %t/libhello.o -o %t/libhello.dylib +# RUN: %lld -dylib -install_name @executable_path/libgoodbye.dylib \ +# RUN: %t/libgoodbye.o -o %t/libgoodbye.dylib # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/dylink.o -# RUN: lld -flavor darwinnew -o %t/dylink -Z -L%t -lhello -lgoodbye %t/dylink.o +# RUN: %lld -o %t/dylink -Z -L%t -lhello -lgoodbye %t/dylink.o # RUN: llvm-objdump --bind -d %t/dylink | FileCheck %s # CHECK: movq [[#%u, HELLO_OFF:]](%rip), %rsi diff --git a/lld/test/MachO/entry-symbol.s b/lld/test/MachO/entry-symbol.s --- a/lld/test/MachO/entry-symbol.s +++ b/lld/test/MachO/entry-symbol.s @@ -1,8 +1,8 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o -# RUN: lld -flavor darwinnew -o /dev/null %t.o -e _not_main -# RUN: not lld -flavor darwinnew -o /dev/null %t.o -e _missing 2>&1 | FileCheck %s -# RUN: not lld -flavor darwinnew -o /dev/null %t.o 2>&1 | FileCheck %s --check-prefix=DEFAULT_ENTRY +# RUN: %lld -o /dev/null %t.o -e _not_main +# RUN: not %lld -o /dev/null %t.o -e _missing 2>&1 | FileCheck %s +# RUN: not %lld -o /dev/null %t.o 2>&1 | FileCheck %s --check-prefix=DEFAULT_ENTRY # CHECK: undefined symbol: _missing # DEFAULT_ENTRY: undefined symbol: _main diff --git a/lld/test/MachO/export-trie.s b/lld/test/MachO/export-trie.s --- a/lld/test/MachO/export-trie.s +++ b/lld/test/MachO/export-trie.s @@ -1,6 +1,6 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o -# RUN: lld -flavor darwinnew -dylib %t.o -o %t.dylib +# RUN: %lld -dylib %t.o -o %t.dylib # RUN: llvm-objdump --exports-trie -d %t.dylib | FileCheck %s --check-prefix=EXPORTS # EXPORTS-LABEL: Exports trie: diff --git a/lld/test/MachO/fat-arch.s b/lld/test/MachO/fat-arch.s --- a/lld/test/MachO/fat-arch.s +++ b/lld/test/MachO/fat-arch.s @@ -2,10 +2,10 @@ # RUN: llvm-mc -filetype=obj -triple=i386-apple-darwin %s -o %t.i386.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.x86_64.o # RUN: llvm-lipo %t.i386.o %t.x86_64.o -create -o %t.fat.o -# RUN: lld -flavor darwinnew -arch x86_64 -o /dev/null %t.fat.o +# RUN: %lld -arch x86_64 -o /dev/null %t.fat.o # RUN: llvm-lipo %t.i386.o -create -o %t.noarch.o -# RUN: not lld -flavor darwinnew -arch x86_64 -o /dev/null %t.noarch.o 2>&1 | \ +# RUN: not %lld -arch x86_64 -o /dev/null %t.noarch.o 2>&1 | \ # RUN: FileCheck %s -DFILE=%t.noarch.o # CHECK: Unable to find matching architecture in [[FILE]] # CHECK: undefined symbol: _main diff --git a/lld/test/MachO/invalid-executable.s b/lld/test/MachO/invalid-executable.s --- a/lld/test/MachO/invalid-executable.s +++ b/lld/test/MachO/invalid-executable.s @@ -1,7 +1,7 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-darwin %s -o %t.o -# RUN: lld -flavor darwinnew -o %t %t.o -# RUN: not lld -flavor darwinnew -o /dev/null %t 2>&1 | FileCheck %s +# RUN: %lld -o %t %t.o +# RUN: not %lld -o /dev/null %t 2>&1 | FileCheck %s # CHECK: unhandled file type .text diff --git a/lld/test/MachO/lit.local.cfg b/lld/test/MachO/lit.local.cfg new file mode 100644 --- /dev/null +++ b/lld/test/MachO/lit.local.cfg @@ -0,0 +1,3 @@ +config.substitutions += [ + ('%lld', 'lld -flavor darwinnew'), +] diff --git a/lld/test/MachO/load-commands.s b/lld/test/MachO/load-commands.s --- a/lld/test/MachO/load-commands.s +++ b/lld/test/MachO/load-commands.s @@ -1,6 +1,6 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o -# RUN: lld -flavor darwinnew -o %t %t.o +# RUN: %lld -o %t %t.o ## Check for the presence of load commands that are essential for a working ## executable. diff --git a/lld/test/MachO/missing-dylib.s b/lld/test/MachO/missing-dylib.s --- a/lld/test/MachO/missing-dylib.s +++ b/lld/test/MachO/missing-dylib.s @@ -1,5 +1,5 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o -# RUN: not lld -flavor darwinnew -Z -o %t -lmissing %t.o 2>&1 | FileCheck %s +# RUN: not %lld -Z -o %t -lmissing %t.o 2>&1 | FileCheck %s # CHECK: library not found for -lmissing diff --git a/lld/test/MachO/no-exports-dylib.s b/lld/test/MachO/no-exports-dylib.s --- a/lld/test/MachO/no-exports-dylib.s +++ b/lld/test/MachO/no-exports-dylib.s @@ -1,6 +1,6 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o -# RUN: lld -flavor darwinnew -dylib %t.o -o %t.dylib +# RUN: %lld -dylib %t.o -o %t.dylib # RUN: obj2yaml %t.dylib | FileCheck %s # CHECK: export_size: 0 diff --git a/lld/test/MachO/no-id-dylink.s b/lld/test/MachO/no-id-dylink.s --- a/lld/test/MachO/no-id-dylink.s +++ b/lld/test/MachO/no-id-dylink.s @@ -2,7 +2,7 @@ # RUN: mkdir -p %t # RUN: yaml2obj %p/Inputs/no-id-dylib.yaml -o %t/libnoid.dylib # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/no-id-dylink.o -# RUN: not lld -flavor darwinnew -o %t/no-id-dylink -Z -L%t -lnoid %t/no-id-dylink.o 2>&1 | FileCheck %s +# RUN: not %lld -o %t/no-id-dylink -Z -L%t -lnoid %t/no-id-dylink.o 2>&1 | FileCheck %s # CHECK: dylib {{.*}}libnoid.dylib missing LC_ID_DYLIB load command .text diff --git a/lld/test/MachO/no-such-file.s b/lld/test/MachO/no-such-file.s --- a/lld/test/MachO/no-such-file.s +++ b/lld/test/MachO/no-such-file.s @@ -1,4 +1,4 @@ # REQUIRES: x86 -# RUN: not lld -flavor darwinnew -o /dev/null %t-no-such-file.o 2>&1 | FileCheck %s +# RUN: not %lld -o /dev/null %t-no-such-file.o 2>&1 | FileCheck %s # CHECK: cannot open {{.*}}no-such-file.o diff --git a/lld/test/MachO/relocations.s b/lld/test/MachO/relocations.s --- a/lld/test/MachO/relocations.s +++ b/lld/test/MachO/relocations.s @@ -1,6 +1,6 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o -# RUN: lld -flavor darwinnew -o %t %t.o +# RUN: %lld -o %t %t.o # RUN: llvm-objdump -d %t | FileCheck %s # CHECK: leaq 17(%rip), %rsi diff --git a/lld/test/MachO/section-headers.s b/lld/test/MachO/section-headers.s --- a/lld/test/MachO/section-headers.s +++ b/lld/test/MachO/section-headers.s @@ -1,6 +1,6 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o -# RUN: lld -flavor darwinnew -o %t %t.o +# RUN: %lld -o %t %t.o # RUN: llvm-readobj --section-headers %t | FileCheck %s # CHECK: Name: __text diff --git a/lld/test/MachO/segments.s b/lld/test/MachO/segments.s --- a/lld/test/MachO/segments.s +++ b/lld/test/MachO/segments.s @@ -1,6 +1,6 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o -# RUN: lld -flavor darwinnew -o %t %t.o +# RUN: %lld -o %t %t.o # RUN: llvm-readobj --macho-segment %t | FileCheck %s ## These two segments must always be present at the start of an executable. diff --git a/lld/test/MachO/silent-ignore.test b/lld/test/MachO/silent-ignore.test --- a/lld/test/MachO/silent-ignore.test +++ b/lld/test/MachO/silent-ignore.test @@ -1,8 +1,8 @@ -RUN: lld -flavor darwinnew -v \ +RUN: %lld -v \ RUN: -demangle \ RUN: -dynamic \ RUN: -no_deduplicate \ RUN: -lto_library /lib/foo \ RUN: -macosx_version_min 0 -RUN: not lld -flavor darwinnew -v --not-an-ignored-argument 2>&1 | FileCheck %s +RUN: not %lld -v --not-an-ignored-argument 2>&1 | FileCheck %s CHECK: unknown argument: --not-an-ignored-argument