diff --git a/lld/test/MachO/U-dynamic-lookup.s b/lld/test/MachO/U-dynamic-lookup.s --- a/lld/test/MachO/U-dynamic-lookup.s +++ b/lld/test/MachO/U-dynamic-lookup.s @@ -10,13 +10,13 @@ # against the Undefined from foo.o. _bar isn't referenced in any object file, # but starts out as Undefined because of the -u flag. _baz isn't referenced # at all. -# RUN: %lld -lSystem %t/main.o -U _foo -U _bar -u _bar -U _baz -o %t/out +# RUN: %lld %t/main.o -U _foo -U _bar -u _bar -U _baz -o %t/out # RUN: llvm-objdump --macho --lazy-bind %t/out | FileCheck --check-prefix=DYNAMIC %s # RUN: llvm-nm -m %t/out | FileCheck --check-prefix=DYNAMICSYM %s # Same thing should happen if _foo starts out as an Undefined. # `-U _foo` being passed twice shouldn't have an effect either. -# RUN: %lld -lSystem %t/main.o -u _foo -U _foo -U _foo -u _bar -U _bar -U _baz -o %t/out +# RUN: %lld %t/main.o -u _foo -U _foo -U _foo -u _bar -U _bar -U _baz -o %t/out # RUN: llvm-objdump --macho --lazy-bind %t/out | FileCheck --check-prefix=DYNAMIC %s # RUN: llvm-nm -m %t/out | FileCheck --check-prefix=DYNAMICSYM %s @@ -35,14 +35,14 @@ # Test with a Defined. Here, foo.o provides _foo and the symbol doesn't need # to be imported. -# RUN: %lld -lSystem %t/main.o %t/foo.o -U _foo -o %t/out +# RUN: %lld %t/main.o %t/foo.o -U _foo -o %t/out # RUN: llvm-objdump --macho --lazy-bind %t/out | FileCheck --check-prefix=NOTDYNAMIC %s # NOTDYNAMIC-NOT: _foo # Here, foo.dylib provides _foo and the symbol doesn't need to be imported # dynamically. -# RUN: %lld -lSystem %t/main.o %t/foo.dylib -U _foo -o %t/out +# RUN: %lld %t/main.o %t/foo.dylib -U _foo -o %t/out # RUN: llvm-objdump --macho --lazy-bind %t/out | FileCheck --check-prefix=TWOLEVEL %s # RUN: llvm-nm -m %t/out | FileCheck --check-prefix=TWOLEVELSYM %s @@ -58,7 +58,7 @@ # WEAKDEFSYM: weak external _foo # Same if foo.dylib provides _foo weakly, except that the symbol is weak then. -# RUN: %lld -lSystem %t/main.o %t/weak-foo.dylib -U _foo -o %t/out +# RUN: %lld %t/main.o %t/weak-foo.dylib -U _foo -o %t/out # RUN: llvm-objdump --macho --bind --lazy-bind --weak-bind %t/out | FileCheck --check-prefix=TWOLEVELWEAK %s # RUN: llvm-nm -m %t/out | FileCheck --check-prefix=TWOLEVELWEAKSYM %s diff --git a/lld/test/MachO/abs-duplicate.s b/lld/test/MachO/abs-duplicate.s --- a/lld/test/MachO/abs-duplicate.s +++ b/lld/test/MachO/abs-duplicate.s @@ -2,14 +2,14 @@ # RUN: rm -rf %t; split-file %s %t # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/weakfoo.s -o %t/weakfoo.o -# RUN: not %lld -lSystem %t/test.o %t/weakfoo.o -o /dev/null 2>&1 | FileCheck %s +# RUN: not %lld %t/test.o %t/weakfoo.o -o /dev/null 2>&1 | FileCheck %s # CHECK: error: duplicate symbol: _weakfoo # CHECK-NEXT: >>> defined in {{.*}}/test.o # CHECK-NEXT: >>> defined in {{.*}}/weakfoo.o ## Duplicate absolute symbols that will be dead stripped later should not fail. -# RUN: %lld -lSystem -dead_strip --dead-strip-duplicates -map %t/stripped-duplicate-map \ +# RUN: %lld -dead_strip --dead-strip-duplicates -map %t/stripped-duplicate-map \ # RUN: %t/test.o %t/weakfoo.o -o %t/test # RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=DUP # DUP-LABEL: SYMBOL TABLE: diff --git a/lld/test/MachO/abs-symbols.s b/lld/test/MachO/abs-symbols.s --- a/lld/test/MachO/abs-symbols.s +++ b/lld/test/MachO/abs-symbols.s @@ -1,6 +1,6 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o -# RUN: %lld -lSystem %t.o -o %t +# RUN: %lld %t.o -o %t # RUN: llvm-objdump --macho --syms --exports-trie %t | FileCheck %s # CHECK-LABEL: SYMBOL TABLE: diff --git a/lld/test/MachO/add-ast-path.s b/lld/test/MachO/add-ast-path.s --- a/lld/test/MachO/add-ast-path.s +++ b/lld/test/MachO/add-ast-path.s @@ -1,6 +1,6 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o -# RUN: %lld -lSystem %t.o -o %t -add_ast_path asdf -add_ast_path fdsa +# RUN: %lld %t.o -o %t -add_ast_path asdf -add_ast_path fdsa # RUN: dsymutil -s %t | FileCheck %s # CHECK: [ 0] {{[0-9a-f]+}} 32 (N_AST ) 00 0000 0000000000000000 'asdf' # CHECK-NEXT: [ 1] {{[0-9a-f]+}} 32 (N_AST ) 00 0000 0000000000000000 'fdsa' diff --git a/lld/test/MachO/adhoc-codesign.s b/lld/test/MachO/adhoc-codesign.s --- a/lld/test/MachO/adhoc-codesign.s +++ b/lld/test/MachO/adhoc-codesign.s @@ -12,21 +12,21 @@ # Exhaustive test for: # (x86_64-macos, arm64-macos, arm64-ios-simulator) x (default, -adhoc_codesign, -no_adhoc-codesign) x (execute, dylib, bundle) -# RUN: %lld -lSystem -arch x86_64 -execute -o %t/out %t/main-x86_64-macos.o +# RUN: %lld -arch x86_64 -execute -o %t/out %t/main-x86_64-macos.o # RUN: llvm-objdump --macho --all-headers %t/out | FileCheck --check-prefix=NO-ADHOC %s # RUN: %lld -arch x86_64 -dylib -o %t/out %t/foo-x86_64-macos.o # RUN: llvm-objdump --macho --all-headers %t/out| FileCheck --check-prefix=NO-ADHOC %s # RUN: %lld -arch x86_64 -bundle -o %t/out %t/foo-x86_64-macos.o # RUN: llvm-objdump --macho --all-headers %t/out| FileCheck --check-prefix=NO-ADHOC %s -# RUN: %lld -lSystem -arch x86_64 -execute -adhoc_codesign -o %t/out %t/main-x86_64-macos.o +# RUN: %lld -arch x86_64 -execute -adhoc_codesign -o %t/out %t/main-x86_64-macos.o # RUN: llvm-objdump --macho --all-headers %t/out| FileCheck --check-prefix=ADHOC %s # RUN: %lld -arch x86_64 -dylib -adhoc_codesign -o %t/out %t/foo-x86_64-macos.o # RUN: llvm-objdump --macho --all-headers %t/out| FileCheck --check-prefix=ADHOC %s # RUN: %lld -arch x86_64 -bundle -adhoc_codesign -o %t/out %t/foo-x86_64-macos.o # RUN: llvm-objdump --macho --all-headers %t/out| FileCheck --check-prefix=ADHOC %s -# RUN: %lld -lSystem -arch x86_64 -execute -no_adhoc_codesign -o %t/out %t/main-x86_64-macos.o +# RUN: %lld -arch x86_64 -execute -no_adhoc_codesign -o %t/out %t/main-x86_64-macos.o # RUN: llvm-objdump --macho --all-headers %t/out| FileCheck --check-prefix=NO-ADHOC %s # RUN: %lld -arch x86_64 -dylib -no_adhoc_codesign -o %t/out %t/foo-x86_64-macos.o # RUN: llvm-objdump --macho --all-headers %t/out| FileCheck --check-prefix=NO-ADHOC %s @@ -34,21 +34,21 @@ # RUN: llvm-objdump --macho --all-headers %t/out| FileCheck --check-prefix=NO-ADHOC %s -# RUN: %lld -lSystem -arch arm64 -execute -o %t/out %t/main-arm64-macos.o +# RUN: %lld -arch arm64 -execute -o %t/out %t/main-arm64-macos.o # RUN: llvm-objdump --macho --all-headers %t/out | FileCheck --check-prefix=ADHOC %s # RUN: %lld -arch arm64 -dylib -o %t/out %t/foo-arm64-macos.o # RUN: llvm-objdump --macho --all-headers %t/out| FileCheck --check-prefix=ADHOC %s # RUN: %lld -arch arm64 -bundle -o %t/out %t/foo-arm64-macos.o # RUN: llvm-objdump --macho --all-headers %t/out| FileCheck --check-prefix=ADHOC %s -# RUN: %lld -lSystem -arch arm64 -execute -adhoc_codesign -o %t/out %t/main-arm64-macos.o +# RUN: %lld -arch arm64 -execute -adhoc_codesign -o %t/out %t/main-arm64-macos.o # RUN: llvm-objdump --macho --all-headers %t/out| FileCheck --check-prefix=ADHOC %s # RUN: %lld -arch arm64 -dylib -adhoc_codesign -o %t/out %t/foo-arm64-macos.o # RUN: llvm-objdump --macho --all-headers %t/out| FileCheck --check-prefix=ADHOC %s # RUN: %lld -arch arm64 -bundle -adhoc_codesign -o %t/out %t/foo-arm64-macos.o # RUN: llvm-objdump --macho --all-headers %t/out| FileCheck --check-prefix=ADHOC %s -# RUN: %lld -lSystem -arch arm64 -execute -no_adhoc_codesign -o %t/out %t/main-arm64-macos.o +# RUN: %lld -arch arm64 -execute -no_adhoc_codesign -o %t/out %t/main-arm64-macos.o # RUN: llvm-objdump --macho --all-headers %t/out| FileCheck --check-prefix=NO-ADHOC %s # RUN: %lld -arch arm64 -dylib -no_adhoc_codesign -o %t/out %t/foo-arm64-macos.o # RUN: llvm-objdump --macho --all-headers %t/out| FileCheck --check-prefix=NO-ADHOC %s @@ -70,7 +70,7 @@ # RUN: %no-arg-lld -arch arm64 -platform_version ios-simulator 14.0 15.0 -bundle -adhoc_codesign -o %t/out %t/foo-arm64-sim.o # RUN: llvm-objdump --macho --all-headers %t/out| FileCheck --check-prefix=ADHOC %s -# RUN: %no-arg-lld -lSystem -arch arm64 -platform_version ios-simulator 14.0 15.0 -execute -no_adhoc_codesign -o %t/out %t/main-arm64-sim.o -syslibroot %S/Inputs/iPhoneSimulator.sdk +# RUN: %no-arg-lld -arch arm64 -platform_version ios-simulator 14.0 15.0 -execute -no_adhoc_codesign -o %t/out %t/main-arm64-sim.o -syslibroot %S/Inputs/iPhoneSimulator.sdk # RUN: llvm-objdump --macho --all-headers %t/out| FileCheck --check-prefix=NO-ADHOC %s # RUN: %no-arg-lld -arch arm64 -platform_version ios-simulator 14.0 15.0 -dylib -no_adhoc_codesign -o %t/out %t/foo-arm64-sim.o # RUN: llvm-objdump --macho --all-headers %t/out| FileCheck --check-prefix=NO-ADHOC %s diff --git a/lld/test/MachO/alias-symbols.s b/lld/test/MachO/alias-symbols.s --- a/lld/test/MachO/alias-symbols.s +++ b/lld/test/MachO/alias-symbols.s @@ -5,7 +5,7 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/weak-extern-alias-to-weak.s -o %t/weak-extern-alias-to-weak.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/weak-extern-alias-to-strong.s -o %t/weak-extern-alias-to-strong.o -# RUN: %lld -lSystem %t/aliases.o %t/definitions.o -o %t/out +# RUN: %lld %t/aliases.o %t/definitions.o -o %t/out # RUN: llvm-objdump --macho --syms %t/out | FileCheck %s ## local aliases should be dropped entirely. --implicit-check-not doesn't seem @@ -24,7 +24,7 @@ # CHECK-DAG: [[#DEAD]] g F __TEXT,__text _no_dead_strip_alias # CHECK-DAG: [[#STRONG]] g F __TEXT,__text _weak_extern_alias_to_strong -# RUN: %lld -lSystem -dead_strip %t/aliases.o %t/definitions.o -o %t/dead-stripped +# RUN: %lld -dead_strip %t/aliases.o %t/definitions.o -o %t/dead-stripped # RUN: llvm-objdump --macho --syms %t/dead-stripped | FileCheck %s --check-prefix=STRIPPED # STRIPPED: SYMBOL TABLE: @@ -33,7 +33,7 @@ # STRIPPED-NEXT: *UND* dyld_stub_binder # STRIPPED-EMPTY: -# RUN: not %lld -lSystem %t/aliases.o %t/definitions.o \ +# RUN: not %lld %t/aliases.o %t/definitions.o \ # RUN: %t/weak-extern-alias-to-strong.o -o /dev/null 2>&1 ## Verify that we preserve the file names of the aliases, rather than using the @@ -50,19 +50,19 @@ ## we should feel free to change it in the future should it be helpful for the ## implementation. -# RUN: %lld -lSystem %t/aliases.o %t/definitions.o \ +# RUN: %lld %t/aliases.o %t/definitions.o \ # RUN: %t/weak-extern-alias-to-weak.o -o %t/alias-clash-1 # RUN: llvm-objdump --macho --syms %t/alias-clash-1 | FileCheck %s --check-prefix WEAK-1 -# RUN: %lld -lSystem %t/weak-extern-alias-to-weak.o %t/aliases.o \ +# RUN: %lld %t/weak-extern-alias-to-weak.o %t/aliases.o \ # RUN: %t/definitions.o -o %t/alias-clash-2 # RUN: llvm-objdump --macho --syms %t/alias-clash-2 | FileCheck %s --check-prefix WEAK-2 -# RUN: %lld -lSystem %t/aliases.o %t/definitions.o \ +# RUN: %lld %t/aliases.o %t/definitions.o \ # RUN: -alias _weak_2 _weak_extern_alias_to_weak -o %t/opt-vs-symbol # RUN: llvm-objdump --macho --syms %t/opt-vs-symbol | FileCheck %s --check-prefix WEAK-2 -# RUN: %lld -lSystem -alias _weak_2 _weak_extern_alias_to_weak %t/aliases.o \ +# RUN: %lld -alias _weak_2 _weak_extern_alias_to_weak %t/aliases.o \ # RUN: %t/definitions.o -o %t/opt-vs-symbol # RUN: llvm-objdump --macho --syms %t/opt-vs-symbol | FileCheck %s --check-prefix WEAK-2 diff --git a/lld/test/MachO/arm-branch-relocs.s b/lld/test/MachO/arm-branch-relocs.s --- a/lld/test/MachO/arm-branch-relocs.s +++ b/lld/test/MachO/arm-branch-relocs.s @@ -1,6 +1,6 @@ # REQUIRES: arm # RUN: llvm-mc -filetype=obj -triple=armv7-apple-watchos %s -o %t.o -# RUN: %lld-watchos -dylib -arch armv7 -lSystem -o %t %t.o +# RUN: %lld-watchos -dylib -arch armv7 -o %t %t.o # RUN: llvm-objdump --macho -d %t | FileCheck %s # CHECK: _arm: diff --git a/lld/test/MachO/arm64-32-reloc-got-load.s b/lld/test/MachO/arm64-32-reloc-got-load.s --- a/lld/test/MachO/arm64-32-reloc-got-load.s +++ b/lld/test/MachO/arm64-32-reloc-got-load.s @@ -4,11 +4,11 @@ # RUN: llvm-mc -filetype=obj -triple=arm64_32-apple-darwin %t/main.s -o %t/main.o # RUN: llvm-mc -filetype=obj -triple=arm64_32-apple-darwin %t/foobar.s -o %t/foobar.o -# RUN: %lld-watchos -lSystem -arch arm64_32 -o %t/static %t/main.o %t/foobar.o +# RUN: %lld-watchos -arch arm64_32 -o %t/static %t/main.o %t/foobar.o # RUN: llvm-objdump --no-print-imm-hex --macho -d --no-show-raw-insn --syms %t/static | FileCheck %s --check-prefix=STATIC -# RUN: %lld-watchos -lSystem -arch arm64_32 -dylib -o %t/libfoo.dylib %t/foobar.o -# RUN: %lld-watchos -lSystem -arch arm64_32 -o %t/main %t/main.o %t/libfoo.dylib +# RUN: %lld-watchos -arch arm64_32 -dylib -o %t/libfoo.dylib %t/foobar.o +# RUN: %lld-watchos -arch arm64_32 -o %t/main %t/main.o %t/libfoo.dylib # RUN: llvm-objdump --no-print-imm-hex --macho -d --no-show-raw-insn --section-headers %t/main | FileCheck %s --check-prefix=DYLIB # STATIC-LABEL: _main: diff --git a/lld/test/MachO/arm64-32-stubs.s b/lld/test/MachO/arm64-32-stubs.s --- a/lld/test/MachO/arm64-32-stubs.s +++ b/lld/test/MachO/arm64-32-stubs.s @@ -10,7 +10,7 @@ # RUN: llvm-mc -filetype=obj -triple=arm64_32-apple-watchos %t/test.s -o %t/test.o # RUN: %lld-watchos -dylib -install_name @executable_path/libfoo.dylib %t/foo.o -o %t/libfoo.dylib # RUN: %lld-watchos -dylib -install_name @executable_path/libbar.dylib %t/bar.o -o %t/libbar.dylib -# RUN: %lld-watchos -lSystem %t/libfoo.dylib %t/libbar.dylib %t/test.o -o %t/test +# RUN: %lld-watchos %t/libfoo.dylib %t/libbar.dylib %t/test.o -o %t/test # RUN: llvm-objdump --no-print-imm-hex --macho -d --no-show-raw-insn --section="__TEXT,__stubs" --section="__TEXT,__stub_helper" %t/test | FileCheck %s diff --git a/lld/test/MachO/arm64-objc-stubs.s b/lld/test/MachO/arm64-objc-stubs.s --- a/lld/test/MachO/arm64-objc-stubs.s +++ b/lld/test/MachO/arm64-objc-stubs.s @@ -1,13 +1,13 @@ # REQUIRES: aarch64 # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %s -o %t.o -# RUN: %lld -arch arm64 -lSystem -o %t.out %t.o +# RUN: %lld -arch arm64 -o %t.out %t.o # RUN: llvm-otool -vs __TEXT __objc_stubs %t.out | FileCheck %s -# RUN: %lld -arch arm64 -lSystem -o %t.out %t.o -dead_strip +# RUN: %lld -arch arm64 -o %t.out %t.o -dead_strip # RUN: llvm-otool -vs __TEXT __objc_stubs %t.out | FileCheck %s -# RUN: %lld -arch arm64 -lSystem -o %t.out %t.o -objc_stubs_fast +# RUN: %lld -arch arm64 -o %t.out %t.o -objc_stubs_fast # RUN: llvm-otool -vs __TEXT __objc_stubs %t.out | FileCheck %s -# RUN: %no-fatal-warnings-lld -arch arm64 -lSystem -o %t.out %t.o -objc_stubs_small 2>&1 | FileCheck %s --check-prefix=WARNING +# RUN: %no-fatal-warnings-lld -arch arm64 -o %t.out %t.o -objc_stubs_small 2>&1 | FileCheck %s --check-prefix=WARNING # RUN: llvm-otool -vs __TEXT __objc_stubs %t.out | FileCheck %s # WARNING: warning: -objc_stubs_small is not yet implemented, defaulting to -objc_stubs_fast diff --git a/lld/test/MachO/arm64-reloc-got-load.s b/lld/test/MachO/arm64-reloc-got-load.s --- a/lld/test/MachO/arm64-reloc-got-load.s +++ b/lld/test/MachO/arm64-reloc-got-load.s @@ -4,11 +4,11 @@ # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/main.s -o %t/main.o # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/foobar.s -o %t/foobar.o -# RUN: %lld -lSystem -arch arm64 -o %t/static %t/main.o %t/foobar.o +# RUN: %lld -arch arm64 -o %t/static %t/main.o %t/foobar.o # RUN: llvm-objdump --no-print-imm-hex --macho -d --no-show-raw-insn --syms %t/static | FileCheck %s --check-prefix=STATIC -# RUN: %lld -lSystem -arch arm64 -dylib -o %t/libfoo.dylib %t/foobar.o -# RUN: %lld -lSystem -arch arm64 -o %t/main %t/main.o %t/libfoo.dylib +# RUN: %lld -arch arm64 -dylib -o %t/libfoo.dylib %t/foobar.o +# RUN: %lld -arch arm64 -o %t/main %t/main.o %t/libfoo.dylib # RUN: llvm-objdump --no-print-imm-hex --macho -d --no-show-raw-insn --section-headers %t/main | FileCheck %s --check-prefix=DYLIB # STATIC-LABEL: _main: diff --git a/lld/test/MachO/arm64-reloc-pointer-to-got.s b/lld/test/MachO/arm64-reloc-pointer-to-got.s --- a/lld/test/MachO/arm64-reloc-pointer-to-got.s +++ b/lld/test/MachO/arm64-reloc-pointer-to-got.s @@ -1,7 +1,7 @@ # REQUIRES: aarch64 # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %s -o %t.o -# RUN: %lld -lSystem -arch arm64 -o %t %t.o +# RUN: %lld -arch arm64 -o %t %t.o # RUN: llvm-objdump --macho -d --full-contents --section-headers %t | FileCheck %s ## FIXME: Even though we have reserved a GOT slot for _foo due to diff --git a/lld/test/MachO/arm64-reloc-tlv-load.s b/lld/test/MachO/arm64-reloc-tlv-load.s --- a/lld/test/MachO/arm64-reloc-tlv-load.s +++ b/lld/test/MachO/arm64-reloc-tlv-load.s @@ -4,11 +4,11 @@ # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/main.s -o %t/main.o # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/foobar.s -o %t/foobar.o -# RUN: %lld -lSystem -arch arm64 -o %t/static %t/main.o %t/foobar.o +# RUN: %lld -arch arm64 -o %t/static %t/main.o %t/foobar.o # RUN: llvm-objdump --no-print-imm-hex --macho -d --no-show-raw-insn --syms %t/static | FileCheck %s --check-prefix=STATIC -# RUN: %lld -lSystem -arch arm64 -dylib -o %t/libfoo.dylib %t/foobar.o -# RUN: %lld -lSystem -arch arm64 -o %t/main %t/main.o %t/libfoo.dylib +# RUN: %lld -arch arm64 -dylib -o %t/libfoo.dylib %t/foobar.o +# RUN: %lld -arch arm64 -o %t/main %t/main.o %t/libfoo.dylib # RUN: llvm-objdump --no-print-imm-hex --macho -d --no-show-raw-insn --section-headers %t/main | FileCheck %s --check-prefix=DYLIB # STATIC-LABEL: _main: diff --git a/lld/test/MachO/arm64-relocs.s b/lld/test/MachO/arm64-relocs.s --- a/lld/test/MachO/arm64-relocs.s +++ b/lld/test/MachO/arm64-relocs.s @@ -1,6 +1,6 @@ # REQUIRES: aarch64 # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %s -o %t.o -# RUN: %lld -dylib -arch arm64 -lSystem -o %t %t.o +# RUN: %lld -dylib -arch arm64 -o %t %t.o # RUN: llvm-objdump --syms %t > %t.objdump # RUN: llvm-objdump --no-print-imm-hex --macho -d --section=__const %t >> %t.objdump # RUN: FileCheck %s < %t.objdump diff --git a/lld/test/MachO/arm64-stubs.s b/lld/test/MachO/arm64-stubs.s --- a/lld/test/MachO/arm64-stubs.s +++ b/lld/test/MachO/arm64-stubs.s @@ -5,7 +5,7 @@ # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/test.s -o %t/test.o # RUN: %lld -arch arm64 -dylib -install_name @executable_path/libfoo.dylib %t/foo.o -o %t/libfoo.dylib # RUN: %lld -arch arm64 -dylib -install_name @executable_path/libbar.dylib %t/bar.o -o %t/libbar.dylib -# RUN: %lld -arch arm64 -lSystem %t/libfoo.dylib %t/libbar.dylib %t/test.o -o %t/test +# RUN: %lld -arch arm64 %t/libfoo.dylib %t/libbar.dylib %t/test.o -o %t/test # RUN: llvm-objdump --no-print-imm-hex --macho -d --no-show-raw-insn --section="__TEXT,__stubs" --section="__TEXT,__stub_helper" %t/test | FileCheck %s diff --git a/lld/test/MachO/arm64-thunk-starvation.s b/lld/test/MachO/arm64-thunk-starvation.s --- a/lld/test/MachO/arm64-thunk-starvation.s +++ b/lld/test/MachO/arm64-thunk-starvation.s @@ -1,6 +1,6 @@ # REQUIRES: aarch64 # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %s -o %t.o -# RUN: %lld -arch arm64 -lSystem -o %t.out %t.o +# RUN: %lld -arch arm64 -o %t.out %t.o ## Regression test for PR51578. diff --git a/lld/test/MachO/arm64-thunk-visibility.s b/lld/test/MachO/arm64-thunk-visibility.s --- a/lld/test/MachO/arm64-thunk-visibility.s +++ b/lld/test/MachO/arm64-thunk-visibility.s @@ -10,7 +10,7 @@ # RUN: rm -rf %t; split-file %s %t # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/foo.s -o %t/foo.o # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/bar.s -o %t/bar.o -# RUN: %lld -arch arm64 -lSystem -o %t.out %t/foo.o %t/bar.o +# RUN: %lld -arch arm64 -o %t.out %t/foo.o %t/bar.o #--- foo.s diff --git a/lld/test/MachO/arm64-thunks.s b/lld/test/MachO/arm64-thunks.s --- a/lld/test/MachO/arm64-thunks.s +++ b/lld/test/MachO/arm64-thunks.s @@ -12,7 +12,7 @@ # RUN: rm -rf %t; mkdir %t # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %s -o %t/input.o -# RUN: %lld -arch arm64 -dead_strip -lSystem -o %t/thunk %t/input.o +# RUN: %lld -arch arm64 -dead_strip -o %t/thunk %t/input.o # RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t/thunk | FileCheck %s # CHECK: Disassembly of section __TEXT,__text: diff --git a/lld/test/MachO/bind-opcodes.s b/lld/test/MachO/bind-opcodes.s --- a/lld/test/MachO/bind-opcodes.s +++ b/lld/test/MachO/bind-opcodes.s @@ -3,7 +3,7 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/foo.s -o %t/foo.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin --defsym PTR64=0 %t/test.s -o %t/test.o # RUN: %lld -O2 -dylib %t/foo.o -o %t/libfoo.dylib -# RUN: %lld -O2 -lSystem %t/test.o %t/libfoo.dylib -o %t/test-x86_64 +# RUN: %lld -O2 %t/test.o %t/libfoo.dylib -o %t/test-x86_64 ## Test (64-bit): ## 1/ We emit exactly one BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM per symbol. diff --git a/lld/test/MachO/bitcode-bundle.ll b/lld/test/MachO/bitcode-bundle.ll --- a/lld/test/MachO/bitcode-bundle.ll +++ b/lld/test/MachO/bitcode-bundle.ll @@ -2,7 +2,7 @@ ; RUN: rm -rf %t; split-file %s %t ; RUN: opt -module-summary %t/test.ll -o %t/test.o ; RUN: opt -module-summary %t/foo.ll -o %t/foo.o -; RUN: %lld -lSystem -bitcode_bundle %t/test.o %t/foo.o -o %t/test +; RUN: %lld -bitcode_bundle %t/test.o %t/foo.o -o %t/test ; RUN: llvm-objdump --macho --section=__LLVM,__bundle %t/test | FileCheck %s ; RUN: llvm-readobj --macho-segment %t/test | FileCheck %s --check-prefix=SEGMENT diff --git a/lld/test/MachO/bundle-loader.s b/lld/test/MachO/bundle-loader.s --- a/lld/test/MachO/bundle-loader.s +++ b/lld/test/MachO/bundle-loader.s @@ -5,9 +5,9 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/3.s -o %t/3.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/main.s -o %t/main.o -# RUN: %lld -lSystem -dylib -install_name %t/my_lib.dylib -o %t/mylib.dylib %t/2.o -# RUN: %lld -lSystem %t/2.o %t/main.o -o %t/main -# RUN: %lld -lSystem -bundle -bundle_loader %t/main -o %t/bundle.bundle %t/3.o %t/mylib.dylib +# RUN: %lld -dylib -install_name %t/my_lib.dylib -o %t/mylib.dylib %t/2.o +# RUN: %lld %t/2.o %t/main.o -o %t/main +# RUN: %lld -bundle -bundle_loader %t/main -o %t/bundle.bundle %t/3.o %t/mylib.dylib ## Check bundle.bundle to ensure the `my_func` symbol is from executable # RUN: llvm-nm -m %t/bundle.bundle | FileCheck %s --check-prefix BUNDLE # BUNDLE: (undefined) external my_func (from executable) @@ -15,13 +15,13 @@ # BUNDLE-OBJ: segment section address dylib symbol # BUNDLE-OBJ: __DATA __la_symbol_ptr 0x{{[0-9a-f]*}} main-executable my_fun -# RUN: %lld -lSystem -bundle -bundle_loader %t/main -o %t/bundle2.bundle %t/3.o %t/2.o +# RUN: %lld -bundle -bundle_loader %t/main -o %t/bundle2.bundle %t/3.o %t/2.o ## Check bundle.bundle to ensure the `my_func` symbol is not from executable # RUN: llvm-nm -m %t/bundle2.bundle | FileCheck %s --check-prefix BUNDLE2 # BUNDLE2: (__TEXT,__text) external my_func # Test that bundle_loader can only be used with MachO bundle output. -# RUN: not %lld -lSystem -bundle_loader %t/main -o %t/bundle3.bundle 2>&1 | FileCheck %s --check-prefix ERROR +# RUN: not %lld -bundle_loader %t/main -o %t/bundle3.bundle 2>&1 | FileCheck %s --check-prefix ERROR # ERROR: -bundle_loader can only be used with MachO bundle output #--- 2.s diff --git a/lld/test/MachO/cgprofile-obj.s b/lld/test/MachO/cgprofile-obj.s --- a/lld/test/MachO/cgprofile-obj.s +++ b/lld/test/MachO/cgprofile-obj.s @@ -1,9 +1,9 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o -# RUN: %lld -lSystem -e A -o %t.out %t.o +# RUN: %lld -e A -o %t.out %t.o # RUN: llvm-nm --numeric-sort %t.out | FileCheck %s -# RUN: %lld --no-call-graph-profile-sort -lSystem -e A -o %t.out %t.o +# RUN: %lld --no-call-graph-profile-sort -e A -o %t.out %t.o # RUN: llvm-nm --numeric-sort %t.out | FileCheck %s --check-prefix=NO-CG .text diff --git a/lld/test/MachO/chained-fixups-addend.s b/lld/test/MachO/chained-fixups-addend.s --- a/lld/test/MachO/chained-fixups-addend.s +++ b/lld/test/MachO/chained-fixups-addend.s @@ -1,7 +1,7 @@ # REQUIRES: x86 # RUN: rm -rf %t; split-file %s %t # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/dylib.s -o %t/dylib.o -# RUN: %lld -lSystem -dylib %t/dylib.o -o %t/libdylib.dylib +# RUN: %lld -dylib %t/dylib.o -o %t/libdylib.dylib ## FileCheck does not like wrapping arithmetic, so we specify all 3 check variables manually: ## ADDEND := inline/outline addend, unsigned @@ -10,29 +10,29 @@ ## We can use the DYLD_CHAINED_IMPORT import format if 0 <= ADDEND <= 255 bytes. # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/main.s -o %t/main.o --defsym ADDEND=0 -# RUN: %lld -lSystem -dylib %t/main.o -L%t -ldylib -fixup_chains -o %t/out +# RUN: %lld -dylib %t/main.o -L%t -ldylib -fixup_chains -o %t/out # RUN: llvm-objdump --macho --chained-fixups --dyld-info %t/out | \ # RUN: FileCheck %s -D#OUTLINE=0 -D#ADDEND=0 -D#%x,REBASE=0x1000 --check-prefixes=IMPORT,COMMON # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/main.s -o %t/main.o --defsym ADDEND=255 -# RUN: %lld -lSystem -dylib %t/main.o -L%t -ldylib -fixup_chains -o %t/out +# RUN: %lld -dylib %t/main.o -L%t -ldylib -fixup_chains -o %t/out # RUN: llvm-objdump --macho --chained-fixups --dyld-info %t/out | \ # RUN: FileCheck %s -D#OUTLINE=0 -D#ADDEND=255 -D#%x,REBASE=0x10FF --check-prefixes=IMPORT,COMMON ## DYLD_CHAINED_IMPORT_ADDEND is used if the addend fits in a 32-bit signed integer. # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/main.s -o %t/main.o --defsym ADDEND=-1 -# RUN: %lld -lSystem -dylib %t/main.o -L%t -ldylib -fixup_chains -o %t/out +# RUN: %lld -dylib %t/main.o -L%t -ldylib -fixup_chains -o %t/out # RUN: llvm-objdump --macho --chained-fixups --dyld-info %t/out | \ # RUN: FileCheck %s -D#%d,OUTLINE=-1 -D#%x,ADDEND=0xFFFFFFFFFFFFFFFF -D#%x,REBASE=0xFFF \ # RUN: --check-prefixes=IMPORT-ADDEND,COMMON # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/main.s -o %t/main.o --defsym ADDEND=256 -# RUN: %lld -lSystem -dylib %t/main.o -L%t -ldylib -fixup_chains -o %t/out +# RUN: %lld -dylib %t/main.o -L%t -ldylib -fixup_chains -o %t/out # RUN: llvm-objdump --macho --chained-fixups --dyld-info %t/out | \ # RUN: FileCheck %s -D#OUTLINE=256 -D#ADDEND=256 -D#%x,REBASE=0x1100 \ # RUN: --check-prefixes=IMPORT-ADDEND,COMMON ## Otherwise, DYLD_CHAINED_IMPORT_ADDEND64 is used. # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/main.s -o %t/main.o --defsym ADDEND=0x100000000 -# RUN: %lld -lSystem -dylib %t/main.o -L%t -ldylib -fixup_chains -o %t/out +# RUN: %lld -dylib %t/main.o -L%t -ldylib -fixup_chains -o %t/out # RUN: llvm-objdump --macho --chained-fixups --dyld-info %t/out | \ # RUN: FileCheck %s -D#%x,OUTLINE=0x100000000 -D#%x,ADDEND=0x100000000 \ # RUN: -D#%x,REBASE=0x100001000 --check-prefixes=IMPORT-ADDEND64,COMMON diff --git a/lld/test/MachO/common-symbol-resolution.s b/lld/test/MachO/common-symbol-resolution.s --- a/lld/test/MachO/common-symbol-resolution.s +++ b/lld/test/MachO/common-symbol-resolution.s @@ -9,7 +9,7 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/calls-foo.s -o %t/calls-foo.o -# RUN: %lld -lSystem -order_file %t/order -dylib %t/libfoo.o -o %t/libfoo.dylib +# RUN: %lld -order_file %t/order -dylib %t/libfoo.o -o %t/libfoo.dylib # RUN: llvm-ar rcs %t/defined.a %t/defined.o # RUN: llvm-ar rcs %t/weak-defined-and-common.a %t/weak-defined.o %t/common.o @@ -20,38 +20,38 @@ ## regardless of whether it is weak. Moreover, the resolved symbol in the output ## file will always be non-weak, even if the winning input symbol definition was ## weak. -# RUN: %lld -lSystem -order_file %t/order %t/common.o %t/weak-common.o %t/test.o -o %t/test +# RUN: %lld -order_file %t/order %t/common.o %t/weak-common.o %t/test.o -o %t/test # RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=LARGER-COMMON -# RUN: %lld -lSystem -order_file %t/order %t/weak-common.o %t/common.o %t/test.o -o %t/test +# RUN: %lld -order_file %t/order %t/weak-common.o %t/common.o %t/test.o -o %t/test # RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=LARGER-COMMON ## Defined symbols are the only ones that take precedence over common symbols. -# RUN: %lld -lSystem -order_file %t/order %t/defined.o %t/common.o %t/test.o -o %t/test +# RUN: %lld -order_file %t/order %t/defined.o %t/common.o %t/test.o -o %t/test # RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=DEFINED -# RUN: %lld -lSystem -order_file %t/order %t/common.o %t/defined.o %t/test.o -o %t/test +# RUN: %lld -order_file %t/order %t/common.o %t/defined.o %t/test.o -o %t/test # RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=DEFINED -# RUN: %lld -lSystem -order_file %t/order %t/weak-defined.o %t/common.o %t/test.o -o %t/test +# RUN: %lld -order_file %t/order %t/weak-defined.o %t/common.o %t/test.o -o %t/test # RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=WEAK-DEFINED -# RUN: %lld -lSystem -order_file %t/order %t/common.o %t/weak-defined.o %t/test.o -o %t/test +# RUN: %lld -order_file %t/order %t/common.o %t/weak-defined.o %t/test.o -o %t/test # RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=WEAK-DEFINED ## Common symbols take precedence over archive symbols. -# RUN: %lld -lSystem -order_file %t/order %t/defined.a %t/weak-common.o %t/test.o -o %t/test +# RUN: %lld -order_file %t/order %t/defined.a %t/weak-common.o %t/test.o -o %t/test # RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=LARGER-COMMON -# RUN: %lld -lSystem -order_file %t/order %t/weak-common.o %t/defined.a %t/test.o -o %t/test +# RUN: %lld -order_file %t/order %t/weak-common.o %t/defined.a %t/test.o -o %t/test # RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=LARGER-COMMON ## Defined symbols have the same precedence as common symbols within an archive. -# RUN: %lld -lSystem -order_file %t/order %t/weak-defined-and-common.a %t/calls-foo.o -o %t/calls-foo +# RUN: %lld -order_file %t/order %t/weak-defined-and-common.a %t/calls-foo.o -o %t/calls-foo # RUN: llvm-objdump --syms %t/calls-foo | FileCheck %s --check-prefix=WEAK-DEFINED -# RUN: %lld -lSystem -order_file %t/order %t/calls-foo.o %t/common-and-weak-defined.a -o %t/calls-foo +# RUN: %lld -order_file %t/order %t/calls-foo.o %t/common-and-weak-defined.a -o %t/calls-foo # RUN: llvm-objdump --syms %t/calls-foo | FileCheck %s --check-prefix=COMMON ## Common symbols take precedence over dylib symbols. -# RUN: %lld -lSystem -order_file %t/order %t/libfoo.dylib %t/weak-common.o %t/test.o -o %t/test +# RUN: %lld -order_file %t/order %t/libfoo.dylib %t/weak-common.o %t/test.o -o %t/test # RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=LARGER-COMMON -# RUN: %lld -lSystem -order_file %t/order %t/weak-common.o %t/libfoo.dylib %t/test.o -o %t/test +# RUN: %lld -order_file %t/order %t/weak-common.o %t/libfoo.dylib %t/test.o -o %t/test # RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=LARGER-COMMON # LARGER-COMMON-DAG: [[#%x, FOO_ADDR:]] g O __DATA,__common _foo diff --git a/lld/test/MachO/compact-unwind-both-local-and-dylib-personality.s b/lld/test/MachO/compact-unwind-both-local-and-dylib-personality.s --- a/lld/test/MachO/compact-unwind-both-local-and-dylib-personality.s +++ b/lld/test/MachO/compact-unwind-both-local-and-dylib-personality.s @@ -15,11 +15,11 @@ ## check that we can link with 4 personalities without crashing: ## ___gxx_personality_v0 (libc++.tbd), ___gxx_personality_v0(local), _personality_1, and _personality_2 -# RUN: %lld -lSystem -lc++ %t/user_2.o %t/combined.o -o %t/a.out +# RUN: %lld -lc++ %t/user_2.o %t/combined.o -o %t/a.out ## ___gxx_personality_v0 (global), ___gxx_personality_v0(libc++.tbd), _personality_1, and _personality_2 -# RUN: %lld -lSystem -lc++ %t/user_3.o %t/user_2.o -o %t/b.out +# RUN: %lld -lc++ %t/user_3.o %t/user_2.o -o %t/b.out ## ___gxx_personality_v0 (global), ___gxx_personality_v0(local), _personality_1, and _personality_2 -# RUN: %lld -lSystem -dylib %t/user_3.o %t/combined.o %t/user_2.o -o %t/c.out +# RUN: %lld -dylib %t/user_3.o %t/combined.o %t/user_2.o -o %t/c.out ## Postlink checks. # RUN: llvm-nm %t/a.out | FileCheck %s --check-prefix=POSTCHECK @@ -55,7 +55,7 @@ ## Error cases. ## Check that dylib symbols are picked (which means without libc++, we'd get an undefined symbol error. -# RUN: not %lld -lSystem %t/user_2.o %t/combined.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERRORCHECK +# RUN: not %lld %t/user_2.o %t/combined.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERRORCHECK # ERRORCHECK: {{.*}} undefined symbol: ___gxx_personality_v0 #--- user_3.s diff --git a/lld/test/MachO/compact-unwind-lsda-folding.s b/lld/test/MachO/compact-unwind-lsda-folding.s --- a/lld/test/MachO/compact-unwind-lsda-folding.s +++ b/lld/test/MachO/compact-unwind-lsda-folding.s @@ -5,7 +5,7 @@ # REQUIRES: x86 # RUN: rm -rf %t; mkdir %t # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos11.0 -o %t/lsda.o %s -# RUN: %lld -dylib --icf=all -lSystem -lc++ -o %t/liblsda.dylib %t/lsda.o +# RUN: %lld -dylib --icf=all -lc++ -o %t/liblsda.dylib %t/lsda.o # RUN: llvm-objdump --macho --syms --unwind-info %t/liblsda.dylib | FileCheck %s ## Check that f and g have the same unwind encoding and LSDA offset (we need to diff --git a/lld/test/MachO/compact-unwind.s b/lld/test/MachO/compact-unwind.s --- a/lld/test/MachO/compact-unwind.s +++ b/lld/test/MachO/compact-unwind.s @@ -2,28 +2,28 @@ # RUN: rm -rf %t; split-file %s %t # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin19.0.0 %t/my-personality.s -o %t/x86_64-my-personality.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin19.0.0 %t/main.s -o %t/x86_64-main.o -# RUN: %lld -arch x86_64 -lSystem -lc++ %t/x86_64-my-personality.o %t/x86_64-main.o -o %t/x86_64-personality-first +# RUN: %lld -arch x86_64 -lc++ %t/x86_64-my-personality.o %t/x86_64-main.o -o %t/x86_64-personality-first # RUN: llvm-objdump --macho --unwind-info --syms --indirect-symbols --rebase %t/x86_64-personality-first | FileCheck %s --check-prefixes=FIRST,CHECK -D#%x,BASE=0x100000000 -DSEG=__TEXT -# RUN: %lld -dead_strip -arch x86_64 -lSystem -lc++ %t/x86_64-main.o %t/x86_64-my-personality.o -o %t/x86_64-personality-second +# RUN: %lld -dead_strip -arch x86_64 -lc++ %t/x86_64-main.o %t/x86_64-my-personality.o -o %t/x86_64-personality-second # RUN: llvm-objdump --macho --unwind-info --syms --indirect-symbols --rebase %t/x86_64-personality-second | FileCheck %s --check-prefixes=SECOND,CHECK -D#%x,BASE=0x100000000 -DSEG=__TEXT # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin19.0.0 %t/my-personality.s -o %t/arm64-my-personality.o # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin19.0.0 %t/main.s -o %t/arm64-main.o -# RUN: %lld -arch arm64 -lSystem -lc++ %t/arm64-my-personality.o %t/arm64-main.o -o %t/arm64-personality-first +# RUN: %lld -arch arm64 -lc++ %t/arm64-my-personality.o %t/arm64-main.o -o %t/arm64-personality-first # RUN: llvm-objdump --macho --unwind-info --syms --indirect-symbols --rebase %t/arm64-personality-first | FileCheck %s --check-prefixes=FIRST,CHECK -D#%x,BASE=0x100000000 -DSEG=__TEXT -# RUN: %lld -dead_strip -arch arm64 -lSystem -lc++ %t/arm64-main.o %t/arm64-my-personality.o -o %t/arm64-personality-second +# RUN: %lld -dead_strip -arch arm64 -lc++ %t/arm64-main.o %t/arm64-my-personality.o -o %t/arm64-personality-second # RUN: llvm-objdump --macho --unwind-info --syms --indirect-symbols --rebase %t/arm64-personality-second | FileCheck %s --check-prefixes=SECOND,CHECK -D#%x,BASE=0x100000000 -DSEG=__TEXT # RUN: llvm-mc -filetype=obj -triple=arm64_32-apple-watchos %t/my-personality.s -o %t/arm64-32-my-personality.o # RUN: llvm-mc -filetype=obj -triple=arm64_32-apple-watchos %t/main.s -o %t/arm64-32-main.o -# RUN: %lld-watchos -lSystem -lc++ %t/arm64-32-my-personality.o %t/arm64-32-main.o -o %t/arm64-32-personality-first +# RUN: %lld-watchos -lc++ %t/arm64-32-my-personality.o %t/arm64-32-main.o -o %t/arm64-32-personality-first # RUN: llvm-objdump --macho --unwind-info --syms --indirect-symbols --rebase %t/arm64-32-personality-first | FileCheck %s --check-prefixes=FIRST,CHECK -D#%x,BASE=0x4000 -DSEG=__TEXT -# RUN: %lld-watchos -dead_strip -lSystem -lc++ %t/arm64-32-main.o %t/arm64-32-my-personality.o -o %t/arm64-32-personality-second +# RUN: %lld-watchos -dead_strip -lc++ %t/arm64-32-main.o %t/arm64-32-my-personality.o -o %t/arm64-32-personality-second # RUN: llvm-objdump --macho --unwind-info --syms --indirect-symbols --rebase %t/arm64-32-personality-second | FileCheck %s --check-prefixes=SECOND,CHECK -D#%x,BASE=0x4000 -DSEG=__TEXT -# RUN: %lld -arch x86_64 -rename_section __TEXT __gcc_except_tab __RODATA __gcc_except_tab -lSystem -lc++ %t/x86_64-my-personality.o %t/x86_64-main.o -o %t/x86_64-personality-first +# RUN: %lld -arch x86_64 -rename_section __TEXT __gcc_except_tab __RODATA __gcc_except_tab -lc++ %t/x86_64-my-personality.o %t/x86_64-main.o -o %t/x86_64-personality-first # RUN: llvm-objdump --macho --unwind-info --syms --indirect-symbols --rebase %t/x86_64-personality-first | FileCheck %s --check-prefixes=FIRST,CHECK -D#%x,BASE=0x100000000 -DSEG=__RODATA -# RUN: %lld -dead_strip -arch x86_64 -rename_section __TEXT __gcc_except_tab __RODATA __gcc_except_tab -lSystem -lc++ %t/x86_64-main.o %t/x86_64-my-personality.o -o %t/x86_64-personality-second +# RUN: %lld -dead_strip -arch x86_64 -rename_section __TEXT __gcc_except_tab __RODATA __gcc_except_tab -lc++ %t/x86_64-main.o %t/x86_64-my-personality.o -o %t/x86_64-personality-second # RUN: llvm-objdump --macho --unwind-info --syms --indirect-symbols --rebase %t/x86_64-personality-second | FileCheck %s --check-prefixes=SECOND,CHECK -D#%x,BASE=0x100000000 -DSEG=__RODATA # FIRST: Indirect symbols for (__DATA_CONST,__got) @@ -71,7 +71,7 @@ ## remains after dead-stripping. # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin19.0.0 \ # RUN: %t/empty-after-dead-strip.s -o %t/x86_64-empty-after-dead-strip.o -# RUN: %lld -dylib -dead_strip -arch x86_64 -lSystem \ +# RUN: %lld -dylib -dead_strip -arch x86_64 \ # RUN: %t/x86_64-empty-after-dead-strip.o -o %t/x86_64-empty-after-strip.dylib # RUN: llvm-objdump --macho --unwind-info %t/x86_64-empty-after-strip.dylib | \ # RUN: FileCheck %s --check-prefixes=NOUNWIND --allow-empty diff --git a/lld/test/MachO/data-in-code-section-ordering.s b/lld/test/MachO/data-in-code-section-ordering.s --- a/lld/test/MachO/data-in-code-section-ordering.s +++ b/lld/test/MachO/data-in-code-section-ordering.s @@ -10,7 +10,7 @@ # RUN: llvm-mc -filetype=obj --triple=x86_64-apple-darwin -o %t/second.o # RUN: sed -e s/SYM/_third/ %t/input.s | \ # RUN: llvm-mc -filetype=obj --triple=x86_64-apple-darwin -o %t/third.o -# RUN: %lld -dylib -lSystem -order_file %t/order.txt %t/first.o %t/second.o %t/third.o -o %t/out +# RUN: %lld -dylib -order_file %t/order.txt %t/first.o %t/second.o %t/third.o -o %t/out # RUN: llvm-objdump --macho --syms %t/out > %t/dump.txt # RUN: llvm-objdump --macho --data-in-code %t/out >> %t/dump.txt # RUN: FileCheck %s < %t/dump.txt diff --git a/lld/test/MachO/data-in-code.s b/lld/test/MachO/data-in-code.s --- a/lld/test/MachO/data-in-code.s +++ b/lld/test/MachO/data-in-code.s @@ -4,7 +4,7 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/foo.s -o %t/foo.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/bar.s -o %t/bar.o -# RUN: %lld -lSystem %t/foo.o %t/bar.o -o %t/main.exe +# RUN: %lld %t/foo.o %t/bar.o -o %t/main.exe # RUN: llvm-otool -l %t/main.exe > %t/objdump # RUN: llvm-objdump --macho --data-in-code %t/main.exe >> %t/objdump # RUN: FileCheck %s < %t/objdump @@ -25,12 +25,12 @@ # CHECK-NEXT: [[#%x,TEXT + 28]] 24 JUMP_TABLE32 # CHECK-NEXT: [[#%x,TEXT + 68]] 12 JUMP_TABLE32 -# RUN: %lld -lSystem %t/foo.o %t/bar.o -no_data_in_code_info -o %t/main.exe +# RUN: %lld %t/foo.o %t/bar.o -no_data_in_code_info -o %t/main.exe # RUN: llvm-otool -l %t/main.exe | FileCheck --check-prefix=OMIT %s # OMIT-NOT: LC_DATA_IN_CODE -# RUN: %lld -lSystem %t/foo.o %t/bar.o -no_data_in_code_info -data_in_code_info -o %t/main.exe +# RUN: %lld %t/foo.o %t/bar.o -no_data_in_code_info -data_in_code_info -o %t/main.exe # RUN: llvm-otool -l %t/main.exe > %t/objdump # RUN: llvm-objdump --macho --data-in-code %t/main.exe >> %t/objdump # RUN: FileCheck %s < %t/objdump diff --git a/lld/test/MachO/dead-strip-align.s b/lld/test/MachO/dead-strip-align.s --- a/lld/test/MachO/dead-strip-align.s +++ b/lld/test/MachO/dead-strip-align.s @@ -1,6 +1,6 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o -# RUN: %lld -lSystem -o %t.out %t.o -dead_strip +# RUN: %lld -o %t.out %t.o -dead_strip # RUN: llvm-otool -l %t.out | FileCheck --check-prefix=SECT %s # RUN: llvm-otool -vs __TEXT __cstring %t.out | FileCheck %s diff --git a/lld/test/MachO/dead-strip-dylibs.s b/lld/test/MachO/dead-strip-dylibs.s --- a/lld/test/MachO/dead-strip-dylibs.s +++ b/lld/test/MachO/dead-strip-dylibs.s @@ -17,7 +17,7 @@ # RUN: llvm-mc %t/main.s -triple=x86_64-apple-macos -filetype=obj -o %t/main.o ## foo_with_bar.dylib's reexport should be dropped since it's linked implicitly. -# RUN: %lld -lSystem %t/main.o -o %t/main %t/foo_with_bar.dylib +# RUN: %lld %t/main.o -o %t/main %t/foo_with_bar.dylib # RUN: llvm-otool -L %t/main | FileCheck --check-prefix=NOBAR %s # NOBAR-NOT: bar.dylib # NOBAR: /usr/lib/libSystem.dylib @@ -26,19 +26,19 @@ # NOBAR-NOT: bar.dylib ## If bar.dylib is linked explicitly, it should not be dropped. -# RUN: %lld -lSystem %t/main.o -o %t/main %t/foo_with_bar.dylib %t/bar.dylib +# RUN: %lld %t/main.o -o %t/main %t/foo_with_bar.dylib %t/bar.dylib # RUN: llvm-otool -L %t/main | FileCheck --check-prefix=BAR %s # BAR: /usr/lib/libSystem.dylib # BAR: foo_with_bar.dylib # BAR: bar.dylib ## ...except if -dead-strip_dylibs is passed... -# RUN: %lld -lSystem %t/main.o -o %t/main %t/foo_with_bar.dylib %t/bar.dylib \ +# RUN: %lld %t/main.o -o %t/main %t/foo_with_bar.dylib %t/bar.dylib \ # RUN: -dead_strip_dylibs # RUN: llvm-otool -L %t/main | FileCheck --check-prefix=NOBAR %s ## ...or bar is explicitly marked dead-strippable. -# RUN: %lld -lSystem %t/main.o -o %t/main %t/foo.dylib %t/bar-strip.dylib +# RUN: %lld %t/main.o -o %t/main %t/foo.dylib %t/bar-strip.dylib # RUN: llvm-otool -L %t/main | FileCheck --check-prefix=NOBARSTRIP %s # NOBARSTRIP-NOT: bar-strip.dylib # NOBARSTRIP: /usr/lib/libSystem.dylib @@ -48,23 +48,23 @@ ## Even libraries explicitly reexported with -reexport_library are stripped ## if they are not referenced. -# RUN: %lld -lSystem %t/main.o -o %t/main %t/foo_with_bar.dylib \ +# RUN: %lld %t/main.o -o %t/main %t/foo_with_bar.dylib \ # RUN: -reexport_library %t/bar.dylib -dead_strip_dylibs # RUN: llvm-otool -L %t/main | FileCheck --check-prefix=NOBAR %s # RUN: llvm-otool -l %t/main | FileCheck --check-prefix=NOREEXPORT %s # NOREEXPORT-NOT: LC_REEXPORT_DYLIB ## But -needed_library and -needed-l win over -dead_strip_dylibs again. -# RUN: %lld -lSystem %t/main.o -o %t/main %t/foo_with_bar.dylib \ +# RUN: %lld %t/main.o -o %t/main %t/foo_with_bar.dylib \ # RUN: -needed_library %t/bar.dylib -dead_strip_dylibs # RUN: llvm-otool -L %t/main | FileCheck --check-prefix=BAR %s -# RUN: %lld -lSystem %t/main.o -o %t/main %t/foo_with_bar.dylib \ +# RUN: %lld %t/main.o -o %t/main %t/foo_with_bar.dylib \ # RUN: -L%t -needed-lbar -dead_strip_dylibs # RUN: llvm-otool -L %t/main | FileCheck --check-prefix=BAR %s ## LC_LINKER_OPTION does not count as an explicit reference. # RUN: llvm-mc %t/linkopt_bar.s -triple=x86_64-apple-macos -filetype=obj -o %t/linkopt_bar.o -# RUN: %lld -lSystem %t/main.o %t/linkopt_bar.o -o %t/main -L %t %t/foo.dylib +# RUN: %lld %t/main.o %t/linkopt_bar.o -o %t/main -L %t %t/foo.dylib # RUN: llvm-otool -L %t/main | FileCheck --check-prefix=NOLIBBAR %s # NOLIBBAR-NOT: libbar.dylib # NOLIBBAR: /usr/lib/libSystem.dylib @@ -73,9 +73,9 @@ # NOLIBBAR-NOT: libbar.dylib ## ...but with an additional explicit reference it's not stripped again. -# RUN: %lld -lSystem %t/main.o %t/linkopt_bar.o -o %t/main -L %t %t/foo.dylib -lbar +# RUN: %lld %t/main.o %t/linkopt_bar.o -o %t/main -L %t %t/foo.dylib -lbar # RUN: llvm-otool -L %t/main | FileCheck --check-prefix=LIBBAR %s -# RUN: %lld -lSystem %t/main.o -o %t/main -L %t %t/foo.dylib -lbar %t/linkopt_bar.o +# RUN: %lld %t/main.o -o %t/main -L %t %t/foo.dylib -lbar %t/linkopt_bar.o # RUN: llvm-otool -L %t/main | FileCheck --check-prefix=LIBBAR %s # LIBBAR-DAG: /usr/lib/libSystem.dylib # LIBBAR-DAG: libbar.dylib @@ -89,31 +89,31 @@ ## In practice, every executable uses dynamic linking, which uses ## dyld_stub_binder, which keeps libSystem alive.) ## Test all permutations of (Undefined, Defined, DylibSymbol). -# RUN: %lld -lSystem -dead_strip_dylibs %t/main.o %t/foo.o %t/foo.dylib -o %t/main +# RUN: %lld -dead_strip_dylibs %t/main.o %t/foo.o %t/foo.dylib -o %t/main # RUN: llvm-otool -L %t/main | FileCheck --check-prefix=NOFOO %s -# RUN: %lld -lSystem -dead_strip_dylibs %t/main.o %t/foo.dylib %t/foo.dylib %t/foo.o -o %t/main +# RUN: %lld -dead_strip_dylibs %t/main.o %t/foo.dylib %t/foo.dylib %t/foo.o -o %t/main # RUN: llvm-otool -L %t/main | FileCheck --check-prefix=NOFOO %s -# RUN: %lld -lSystem -dead_strip_dylibs %t/foo.o %t/main.o %t/foo.dylib -o %t/main +# RUN: %lld -dead_strip_dylibs %t/foo.o %t/main.o %t/foo.dylib -o %t/main # RUN: llvm-otool -L %t/main | FileCheck --check-prefix=NOFOO %s -# RUN: %lld -lSystem -dead_strip_dylibs %t/foo.dylib %t/foo.dylib %t/main.o %t/foo.o -o %t/main +# RUN: %lld -dead_strip_dylibs %t/foo.dylib %t/foo.dylib %t/main.o %t/foo.o -o %t/main # RUN: llvm-otool -L %t/main | FileCheck --check-prefix=NOFOO %s -# RUN: %lld -lSystem -dead_strip_dylibs %t/foo.o %t/foo.dylib %t/main.o -o %t/main +# RUN: %lld -dead_strip_dylibs %t/foo.o %t/foo.dylib %t/main.o -o %t/main # RUN: llvm-otool -L %t/main | FileCheck --check-prefix=NOFOO %s -# RUN: %lld -lSystem -dead_strip_dylibs %t/foo.dylib %t/foo.dylib %t/foo.o %t/main.o -o %t/main +# RUN: %lld -dead_strip_dylibs %t/foo.dylib %t/foo.dylib %t/foo.o %t/main.o -o %t/main # RUN: llvm-otool -L %t/main | FileCheck --check-prefix=NOFOO %s # NOFOO-NOT: foo.dylib ## When linking a weak and a strong symbol from two dylibs, we should keep the ## strong one. -# RUN: %lld -lSystem -dead_strip_dylibs %t/main.o %t/foo.dylib %t/weak-foo.dylib -o %t/main +# RUN: %lld -dead_strip_dylibs %t/main.o %t/foo.dylib %t/weak-foo.dylib -o %t/main # RUN: llvm-otool -L %t/main | FileCheck --check-prefix=NOWEAK %s -# RUN: %lld -lSystem -dead_strip_dylibs %t/main.o %t/weak-foo.dylib %t/foo.dylib -o %t/main +# RUN: %lld -dead_strip_dylibs %t/main.o %t/weak-foo.dylib %t/foo.dylib -o %t/main # RUN: llvm-otool -L %t/main | FileCheck --check-prefix=NOWEAK %s -# RUN: %lld -lSystem -dead_strip_dylibs %t/foo.dylib %t/weak-foo.dylib %t/main.o -o %t/main +# RUN: %lld -dead_strip_dylibs %t/foo.dylib %t/weak-foo.dylib %t/main.o -o %t/main # RUN: llvm-otool -L %t/main | FileCheck --check-prefix=NOWEAK %s -# RUN: %lld -lSystem -dead_strip_dylibs %t/weak-foo.dylib %t/foo.dylib %t/main.o -o %t/main +# RUN: %lld -dead_strip_dylibs %t/weak-foo.dylib %t/foo.dylib %t/main.o -o %t/main # RUN: llvm-otool -L %t/main | FileCheck --check-prefix=NOWEAK %s # NOWEAK-NOT: weak-foo.dylib # NOWEAK: /foo.dylib diff --git a/lld/test/MachO/dead-strip.s b/lld/test/MachO/dead-strip.s --- a/lld/test/MachO/dead-strip.s +++ b/lld/test/MachO/dead-strip.s @@ -7,7 +7,7 @@ ## Check that .private_extern symbols are marked as local in the symbol table ## and aren't in the export trie. -# RUN: %lld -lSystem -dead_strip -map %t/map -u _ref_private_extern_u \ +# RUN: %lld -dead_strip -map %t/map -u _ref_private_extern_u \ # RUN: %t/basics.o -o %t/basics # RUN: llvm-objdump --syms --section-headers %t/basics | \ # RUN: FileCheck --check-prefix=EXEC --implicit-check-not _unref %s @@ -58,7 +58,7 @@ ## Run dead stripping on code without any dead symbols. # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos \ # RUN: %t/no-dead-symbols.s -o %t/no-dead-symbols.o -# RUN: %lld -lSystem -dead_strip -map %t/no-dead-symbols-map \ +# RUN: %lld -dead_strip -map %t/no-dead-symbols-map \ # RUN: %t/no-dead-symbols.o -o %t/no-dead-symbols ## Mark the end of the file with a string. # RUN: FileCheck --check-prefix=NODEADSYMBOLS %s < %t/no-dead-symbols-map @@ -90,7 +90,7 @@ # DYLIB-DAG: g {{.*}} _no_dead_strip_globl ## Extern symbols aren't stripped from executables with -export_dynamic -# RUN: %lld -lSystem -dead_strip -export_dynamic -u _ref_private_extern_u \ +# RUN: %lld -dead_strip -export_dynamic -u _ref_private_extern_u \ # RUN: %t/basics.o -o %t/basics-export-dyn # RUN: llvm-objdump --syms --section-headers %t/basics-export-dyn | \ # RUN: FileCheck --check-prefix=EXECDYN %s @@ -118,7 +118,7 @@ ## Absolute symbol handling. # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos \ # RUN: %t/abs.s -o %t/abs.o -# RUN: %lld -lSystem -dead_strip %t/abs.o -o %t/abs +# RUN: %lld -dead_strip %t/abs.o -o %t/abs # RUN: llvm-objdump --macho --syms --exports-trie %t/abs | \ # RUN: FileCheck --check-prefix=ABS %s #ABS-LABEL: SYMBOL TABLE: @@ -133,7 +133,7 @@ ## Check that symbols from -exported_symbol(s_list) are preserved. # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos \ # RUN: %t/exported-symbol.s -o %t/exported-symbol.o -# RUN: %lld -lSystem -dead_strip -exported_symbol _my_exported_symbol \ +# RUN: %lld -dead_strip -exported_symbol _my_exported_symbol \ # RUN: %t/exported-symbol.o -o %t/exported-symbol # RUN: llvm-objdump --syms %t/exported-symbol | \ # RUN: FileCheck --check-prefix=EXPORTEDSYMBOL --implicit-check-not _unref %s @@ -145,7 +145,7 @@ ## Check that mod_init_funcs and mod_term_funcs are not stripped. # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos \ # RUN: %t/mod-funcs.s -o %t/mod-funcs.o -# RUN: %lld -lSystem -dead_strip %t/mod-funcs.o -o %t/mod-funcs +# RUN: %lld -dead_strip %t/mod-funcs.o -o %t/mod-funcs # RUN: llvm-objdump --syms %t/mod-funcs | \ # RUN: FileCheck --check-prefix=MODFUNCS --implicit-check-not _unref %s # MODFUNCS-LABEL: SYMBOL TABLE: @@ -163,7 +163,7 @@ # RUN: %lld -dylib -dead_strip %t/dylib.o -o %t/dylib.dylib # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos \ # RUN: %t/strip-dylib-ref.s -o %t/strip-dylib-ref.o -# RUN: %lld -lSystem -dead_strip %t/strip-dylib-ref.o %t/dylib.dylib \ +# RUN: %lld -dead_strip %t/strip-dylib-ref.o %t/dylib.dylib \ # RUN: -o %t/strip-dylib-ref -U _ref_undef_fun -U _unref_undef_fun # RUN: llvm-objdump --syms --bind --lazy-bind --weak-bind %t/strip-dylib-ref | \ # RUN: FileCheck --check-prefix=STRIPDYLIB --implicit-check-not _unref %s @@ -194,13 +194,13 @@ # STUBS-NOT: jmp ## An undefined symbol referenced from a dead-stripped function shouldn't ## produce a diagnostic: -# RUN: %lld -lSystem -dead_strip %t/strip-dylib-ref.o %t/dylib.dylib \ +# RUN: %lld -dead_strip %t/strip-dylib-ref.o %t/dylib.dylib \ # RUN: -o %t/strip-dylib-ref -U _ref_undef_fun ## Check that referenced undefs are kept with -undefined dynamic_lookup. # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos \ # RUN: %t/ref-undef.s -o %t/ref-undef.o -# RUN: %lld -lSystem -dead_strip %t/ref-undef.o \ +# RUN: %lld -dead_strip %t/ref-undef.o \ # RUN: -o %t/ref-undef -undefined dynamic_lookup # RUN: llvm-objdump --syms --lazy-bind %t/ref-undef | \ # RUN: FileCheck --check-prefix=STRIPDYNLOOKUP %s @@ -212,7 +212,7 @@ ## S_ATTR_LIVE_SUPPORT tests. # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos \ # RUN: %t/live-support.s -o %t/live-support.o -# RUN: %lld -lSystem -dead_strip %t/live-support.o %t/dylib.dylib \ +# RUN: %lld -dead_strip %t/live-support.o %t/dylib.dylib \ # RUN: -U _ref_undef_fun -U _unref_undef_fun -o %t/live-support # RUN: llvm-objdump --syms %t/live-support | \ # RUN: FileCheck --check-prefix=LIVESUPP --implicit-check-not _unref %s @@ -232,7 +232,7 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos \ # RUN: %t/live-support-iterations.s -o %t/live-support-iterations.o -# RUN: %lld -lSystem -dead_strip %t/live-support-iterations.o \ +# RUN: %lld -dead_strip %t/live-support-iterations.o \ # RUN: -o %t/live-support-iterations # RUN: llvm-objdump --syms %t/live-support-iterations | \ # RUN: FileCheck --check-prefix=LIVESUPP2 --implicit-check-not _unref %s @@ -254,7 +254,7 @@ ## (Need to use darwin19.0.0 to make -mc emit __LD,__compact_unwind.) # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin19.0.0 \ # RUN: %t/unwind.s -o %t/unwind.o -# RUN: %lld -lc++ -lSystem -dead_strip %t/unwind.o -o %t/unwind +# RUN: %lld -lc++ -dead_strip %t/unwind.o -o %t/unwind # RUN: llvm-objdump --syms %t/unwind | \ # RUN: FileCheck --check-prefix=UNWIND --implicit-check-not unref %s # RUN: llvm-otool -l %t/unwind | FileCheck --check-prefix=UNWINDSECT %s @@ -281,7 +281,7 @@ # RUN: %t/weak-ref.s -o %t/weak-ref.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos \ # RUN: %t/strong-dead-ref.s -o %t/strong-dead-ref.o -# RUN: %lld -lSystem -dead_strip %t/weak-ref.o %t/strong-dead-ref.o \ +# RUN: %lld -dead_strip %t/weak-ref.o %t/strong-dead-ref.o \ # RUN: %t/dylib.dylib -o %t/weak-ref # RUN: llvm-otool -l %t/weak-ref | FileCheck -DDIR=%t --check-prefix=WEAK %s # WEAK: cmd LC_LOAD_DYLIB @@ -310,7 +310,7 @@ ## Stripped symbols should not be in the debug info stabs entries. # RUN: llvm-mc -g -filetype=obj -triple=x86_64-apple-macos \ # RUN: %t/debug.s -o %t/debug.o -# RUN: %lld -lSystem -dead_strip %t/debug.o -o %t/debug +# RUN: %lld -dead_strip %t/debug.o -o %t/debug # RUN: dsymutil -s %t/debug | FileCheck --check-prefix=EXECSTABS %s # EXECSTABS-NOT: N_FUN {{.*}} '_unref' # EXECSTABS: N_FUN {{.*}} '_main' @@ -335,7 +335,7 @@ # RUN: %t/duplicate1.s -o %t/duplicate1.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos \ # RUN: %t/duplicate2.s -o %t/duplicate2.o -# RUN: %lld -lSystem -dead_strip --dead-strip-duplicates -map %t/stripped-duplicate-map \ +# RUN: %lld -dead_strip --dead-strip-duplicates -map %t/stripped-duplicate-map \ # RUN: %t/duplicate1.o %t/duplicate2.o -o %t/duplicate # RUN: llvm-objdump --syms %t/duplicate | FileCheck %s --check-prefix=DUP # DUP-LABEL: SYMBOL TABLE: diff --git a/lld/test/MachO/dependency-info.s b/lld/test/MachO/dependency-info.s --- a/lld/test/MachO/dependency-info.s +++ b/lld/test/MachO/dependency-info.s @@ -7,7 +7,7 @@ # RUN: llvm-ar csr %t/bar.a %t/bar.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/main.o %t/main.s -# RUN: %lld %t/main.o %t/bar.a %t/libfoo.dylib -lSystem -o %t/test.out -dependency_info %t/deps_info.out +# RUN: %lld %t/main.o %t/bar.a %t/libfoo.dylib -o %t/test.out -dependency_info %t/deps_info.out # RUN: %python %S/Inputs/DependencyDump.py %t/deps_info.out | FileCheck %s # CHECK: lld-version: {{.*}}LLD {{.*}} diff --git a/lld/test/MachO/double-unwind-info.s b/lld/test/MachO/double-unwind-info.s --- a/lld/test/MachO/double-unwind-info.s +++ b/lld/test/MachO/double-unwind-info.s @@ -5,7 +5,7 @@ # COM: obj2yaml %t-r.o > %S/Inputs/double-unwind-info.yaml # RUN: yaml2obj %S/Inputs/double-unwind-info.yaml > %t-r.o -# RUN: %lld -dylib -lSystem %t-r.o -o /dev/null +# RUN: %lld -dylib %t-r.o -o /dev/null .text ## eh_frame function address relocations are only emitted if the function isn't diff --git a/lld/test/MachO/dso-handle.s b/lld/test/MachO/dso-handle.s --- a/lld/test/MachO/dso-handle.s +++ b/lld/test/MachO/dso-handle.s @@ -1,7 +1,7 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o -# RUN: %lld -lSystem %t.o -o %t +# RUN: %lld %t.o -o %t # RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s # CHECK: leaq {{.*}} ## 0x100000000 # CHECK-NEXT: leaq {{.*}} ## 0x100000000 diff --git a/lld/test/MachO/dyld-env.s b/lld/test/MachO/dyld-env.s --- a/lld/test/MachO/dyld-env.s +++ b/lld/test/MachO/dyld-env.s @@ -4,17 +4,17 @@ # RUN: llvm-mc -filetype obj -triple x86_64-apple-darwin %s -o %t/main.o -# RUN: %lld -lSystem -dyld_env DYLD_FRAMEWORK_PATH=./Foo.framework %t/main.o -o %t/one_dyld_env.out +# RUN: %lld -dyld_env DYLD_FRAMEWORK_PATH=./Foo.framework %t/main.o -o %t/one_dyld_env.out # RUN: llvm-otool -l %t/one_dyld_env.out | FileCheck %s --check-prefix=ONE-ENV -# RUN: %lld -lSystem -dyld_env DYLD_FRAMEWORK_PATH=./Foo.framework \ +# RUN: %lld -dyld_env DYLD_FRAMEWORK_PATH=./Foo.framework \ # RUN: -dyld_env DYLD_FRAMEWORK_PATH=./Bar.framework \ # RUN: %t/main.o -o %t/two_dyld_envs.out # RUN: llvm-otool -l %t/two_dyld_envs.out | FileCheck %s --check-prefix=TWO-ENV -# RUN: not %lld -lSystem -dyld_env DYLD_FRAMEWORK_PATH,./Foo %t/main.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=MALFORMED +# RUN: not %lld -dyld_env DYLD_FRAMEWORK_PATH,./Foo %t/main.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=MALFORMED -# RUN: not %lld -dylib -lSystem -dyld_env DYLD_FRAMEWORK_PATH=./Foo %t/main.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=DYLIB +# RUN: not %lld -dylib -dyld_env DYLD_FRAMEWORK_PATH=./Foo %t/main.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=DYLIB # ONE-ENV: Load command 11 # ONE-ENV-NEXT: cmd LC_DYLD_ENVIRONMENT diff --git a/lld/test/MachO/dyld-stub-binder.s b/lld/test/MachO/dyld-stub-binder.s --- a/lld/test/MachO/dyld-stub-binder.s +++ b/lld/test/MachO/dyld-stub-binder.s @@ -11,21 +11,21 @@ ## Binaries that don't do lazy dynamic calls but are linked against ## libSystem.dylib get a reference to dyld_stub_binder even if it's ## not needed. -# RUN: %lld -arch arm64 -lSystem -dylib %t/foo.o -o %t/libfoo.dylib +# RUN: %lld -arch arm64 -dylib %t/foo.o -o %t/libfoo.dylib # RUN: llvm-nm -m %t/libfoo.dylib | FileCheck --check-prefix=STUB %s ## Dylibs that do lazy dynamic calls do need dyld_stub_binder. # RUN: not %no-lsystem-lld -arch arm64 -dylib %t/bar.o %t/libfoo.dylib \ # RUN: -o %t/libbar.dylib 2>&1 | FileCheck --check-prefix=MISSINGSTUB %s -# RUN: %lld -arch arm64 -lSystem -dylib %t/bar.o %t/libfoo.dylib \ +# RUN: %lld -arch arm64 -dylib %t/bar.o %t/libfoo.dylib \ # RUN: -o %t/libbar.dylib # RUN: llvm-nm -m %t/libbar.dylib | FileCheck --check-prefix=STUB %s ## As do executables. # RUN: not %no-lsystem-lld -arch arm64 %t/libfoo.dylib %t/libbar.dylib %t/test.o \ # RUN: -o %t/test 2>&1 | FileCheck --check-prefix=MISSINGSTUB %s -# RUN: %lld -arch arm64 -lSystem %t/libfoo.dylib %t/libbar.dylib %t/test.o \ +# RUN: %lld -arch arm64 %t/libfoo.dylib %t/libbar.dylib %t/test.o \ # RUN: -o %t/test # RUN: llvm-nm -m %t/test | FileCheck --check-prefix=STUB %s diff --git a/lld/test/MachO/dylink-ordinal.s b/lld/test/MachO/dylink-ordinal.s --- a/lld/test/MachO/dylink-ordinal.s +++ b/lld/test/MachO/dylink-ordinal.s @@ -4,7 +4,7 @@ # RUN: rm -rf %t; split-file --no-leading-lines %s %t # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/main.s -o %t/main.o -# RUN: %lld -o %t/main -L%t -lFoo -lBar -lSystem %t/main.o +# RUN: %lld -o %t/main -L%t -lFoo -lBar %t/main.o # RUN: llvm-objdump --lazy-bind -d --no-show-raw-insn %t/main | FileCheck %s # CHECK: callq 0x[[#%x,FOO_OFF:]] diff --git a/lld/test/MachO/eh-frame-sdata4.s b/lld/test/MachO/eh-frame-sdata4.s --- a/lld/test/MachO/eh-frame-sdata4.s +++ b/lld/test/MachO/eh-frame-sdata4.s @@ -7,7 +7,7 @@ ## that use the sdata4 encoding. For instance, libffi does this. # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos10.15 %t/sdata4.s -o %t/sdata4.o -# RUN: %lld -lSystem %t/sdata4.o -o %t/sdata4 +# RUN: %lld %t/sdata4.o -o %t/sdata4 # RUN: llvm-objdump --macho --syms --dwarf=frames %t/sdata4 | FileCheck %s # CHECK: SYMBOL TABLE: diff --git a/lld/test/MachO/eh-frame.s b/lld/test/MachO/eh-frame.s --- a/lld/test/MachO/eh-frame.s +++ b/lld/test/MachO/eh-frame.s @@ -2,7 +2,7 @@ # RUN: rm -rf %t; mkdir %t # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos10.15 %s -o %t/eh-frame-x86_64.o -# RUN: %lld -lSystem -lc++ %t/eh-frame-x86_64.o -o %t/eh-frame-x86_64 +# RUN: %lld -lc++ %t/eh-frame-x86_64.o -o %t/eh-frame-x86_64 # RUN: llvm-objdump --macho --syms --indirect-symbols --unwind-info \ # RUN: --dwarf=frames %t/eh-frame-x86_64 | FileCheck %s -D#BASE=0x100000000 -D#DWARF_ENC=4 # RUN: llvm-nm -m %t/eh-frame-x86_64 | FileCheck %s --check-prefix NO-EH-SYMS @@ -14,20 +14,20 @@ ## than invoking ld64 directly. NOTE: whenever this test is updated, the ## checked-in copy of `ld -r`'s output should be updated too! # COM: ld -r %t/eh-frame-x86_64.o -o %S/Inputs/eh-frame-x86_64-r.o -# RUN: %lld -lSystem -lc++ %S/Inputs/eh-frame-x86_64-r.o -o %t/eh-frame-x86_64-r +# RUN: %lld -lc++ %S/Inputs/eh-frame-x86_64-r.o -o %t/eh-frame-x86_64-r # RUN: llvm-objdump --macho --syms --indirect-symbols --unwind-info \ # RUN: --dwarf=frames %t/eh-frame-x86_64-r | FileCheck %s -D#BASE=0x100000000 -D#DWARF_ENC=4 # RUN: llvm-nm -m %t/eh-frame-x86_64-r | FileCheck %s --check-prefix NO-EH-SYMS # RUN: llvm-readobj --section-headers %t/eh-frame-x86_64-r | FileCheck %s --check-prefix=ALIGN -D#ALIGN=3 # RUN: llvm-mc -filetype=obj -triple=arm64-apple-macos11.0 %s -o %t/eh-frame-arm64.o -# RUN: %lld -arch arm64 -lSystem -lc++ %t/eh-frame-arm64.o -o %t/eh-frame-arm64 +# RUN: %lld -arch arm64 -lc++ %t/eh-frame-arm64.o -o %t/eh-frame-arm64 # RUN: llvm-objdump --macho --syms --indirect-symbols --unwind-info \ # RUN: --dwarf=frames %t/eh-frame-arm64 | FileCheck %s -D#BASE=0x100000000 -D#DWARF_ENC=3 # RUN: llvm-nm -m %t/eh-frame-arm64 | FileCheck %s --check-prefix NO-EH-SYMS # COM: ld -r %t/eh-frame-arm64.o -o %S/Inputs/eh-frame-arm64-r.o -# RUN: %lld -arch arm64 -lSystem -lc++ %S/Inputs/eh-frame-arm64-r.o -o %t/eh-frame-arm64-r +# RUN: %lld -arch arm64 -lc++ %S/Inputs/eh-frame-arm64-r.o -o %t/eh-frame-arm64-r # RUN: llvm-objdump --macho --syms --indirect-symbols --unwind-info \ # RUN: --dwarf=frames %t/eh-frame-arm64-r | FileCheck %s -D#BASE=0x100000000 -D#DWARF_ENC=3 # RUN: llvm-nm -m %t/eh-frame-arm64-r | FileCheck %s --check-prefix NO-EH-SYMS diff --git a/lld/test/MachO/encryption-info.s b/lld/test/MachO/encryption-info.s --- a/lld/test/MachO/encryption-info.s +++ b/lld/test/MachO/encryption-info.s @@ -3,16 +3,16 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/test.o # RUN: llvm-mc -filetype=obj -triple=arm64_32-apple-watchos %s -o %t/watchos-test.o -# RUN: %lld -lSystem -o %t/test %t/test.o +# RUN: %lld -o %t/test %t/test.o # RUN: llvm-objdump --macho --all-headers %t/test | FileCheck %s --check-prefix=NO-ENCRYPTION -DSUFFIX=_64 -# RUN: %lld -lSystem -encryptable -o %t/test %t/test.o +# RUN: %lld -encryptable -o %t/test %t/test.o # RUN: llvm-objdump --macho --all-headers %t/test | FileCheck %s --check-prefix=ENCRYPTION -DSUFFIX=_64 -D#PAGE_SIZE=4096 -# RUN: %lld-watchos -lSystem -o %t/watchos-test %t/watchos-test.o +# RUN: %lld-watchos -o %t/watchos-test %t/watchos-test.o # RUN: llvm-objdump --macho --all-headers %t/watchos-test | FileCheck %s --check-prefix=ENCRYPTION -DSUFFIX= -D#PAGE_SIZE=16384 -# RUN: %lld-watchos -lSystem -no_encryption -o %t/watchos-test %t/watchos-test.o +# RUN: %lld-watchos -no_encryption -o %t/watchos-test %t/watchos-test.o # RUN: llvm-objdump --macho --all-headers %t/watchos-test | FileCheck %s --check-prefix=NO-ENCRYPTION -DSUFFIX= # ENCRYPTION: segname __TEXT 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 @@ -2,9 +2,9 @@ # RUN: rm -rf %t; split-file %s %t # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/not-main.s -o %t/not-main.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/libfoo.s -o %t/libfoo.o -# RUN: %lld -lSystem -dylib %t/libfoo.o -o %t/libfoo.dylib +# RUN: %lld -dylib %t/libfoo.o -o %t/libfoo.dylib -# RUN: %lld -lSystem -o %t/not-main %t/not-main.o -e _not_main +# RUN: %lld -o %t/not-main %t/not-main.o -e _not_main # RUN: llvm-objdump --macho --all-headers --syms %t/not-main | FileCheck %s # CHECK-LABEL: SYMBOL TABLE @@ -21,10 +21,10 @@ # CHECK-NEXT: cmdsize 24 # CHECK-NEXT: entryoff [[#ENTRYOFF]] -# RUN: %lld -lSystem -o %t/dysym-main %t/not-main.o %t/libfoo.dylib -e _dysym_main +# RUN: %lld -o %t/dysym-main %t/not-main.o %t/libfoo.dylib -e _dysym_main # RUN: llvm-objdump --macho --all-headers --indirect-symbols --lazy-bind %t/dysym-main | FileCheck %s --check-prefix=DYSYM -DDYLIB=libfoo -# RUN: %lld -lSystem -o %t/dyn-lookup %t/not-main.o -e _dysym_main -undefined dynamic_lookup +# RUN: %lld -o %t/dyn-lookup %t/not-main.o -e _dysym_main -undefined dynamic_lookup # RUN: llvm-objdump --macho --all-headers --indirect-symbols --lazy-bind %t/dyn-lookup | FileCheck %s --check-prefix=DYSYM -DDYLIB=flat-namespace # DYSYM-LABEL: Indirect symbols for (__TEXT,__stubs) 1 entries @@ -37,7 +37,7 @@ # DYSYM-NEXT: segment section address dylib symbol # DYSYM-NEXT: __DATA __la_symbol_ptr {{.*}} [[DYLIB]] _dysym_main -# RUN: %lld -lSystem -o %t/weak-dysym-main %t/not-main.o %t/libfoo.dylib -e _weak_dysym_main +# RUN: %lld -o %t/weak-dysym-main %t/not-main.o %t/libfoo.dylib -e _weak_dysym_main # RUN: llvm-objdump --macho --all-headers --indirect-symbols --bind --weak-bind %t/weak-dysym-main | FileCheck %s --check-prefix=WEAK-DYSYM # WEAK-DYSYM-LABEL: Indirect symbols for (__TEXT,__stubs) 1 entries # WEAK-DYSYM-NEXT: address index name @@ -52,7 +52,7 @@ # WEAK-DYSYM-NEXT: segment section address type addend symbol # WEAK-DYSYM-NEXT: __DATA __la_symbol_ptr {{.*}} pointer 0 _weak_dysym_main -# RUN: %lld -dylib -lSystem -o %t/dysym-main.dylib %t/not-main.o %t/libfoo.dylib -e _dysym_main +# RUN: %lld -dylib -o %t/dysym-main.dylib %t/not-main.o %t/libfoo.dylib -e _dysym_main # RUN: llvm-objdump --macho --indirect-symbols --lazy-bind %t/dysym-main.dylib | FileCheck %s --check-prefix=DYLIB-NO-MAIN # DYLIB-NO-MAIN-NOT: _dysym_main diff --git a/lld/test/MachO/flat-namespace-dysyms.s b/lld/test/MachO/flat-namespace-dysyms.s --- a/lld/test/MachO/flat-namespace-dysyms.s +++ b/lld/test/MachO/flat-namespace-dysyms.s @@ -5,16 +5,16 @@ # RUN: %lld -dylib -o %t/foo.dylib %t/foo.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/bar.o %t/bar.s -# RUN: %lld -lSystem -dylib -o %t/bar.dylib %t/bar.o %t/foo.dylib +# RUN: %lld -dylib -o %t/bar.dylib %t/bar.o %t/foo.dylib # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/baz.o %t/baz.s -# RUN: %lld -lSystem -dylib -o %t/baz.dylib %t/baz.o %t/bar.dylib +# RUN: %lld -dylib -o %t/baz.dylib %t/baz.o %t/bar.dylib # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/main.o %t/main.s ## With flat_namespace, the linker automatically looks in foo.dylib and ## bar.dylib too, but it doesn't add a LC_LOAD_DYLIB for it. -# RUN: %lld -flat_namespace -lSystem %t/main.o %t/baz.dylib -o %t/out -t \ +# RUN: %lld -flat_namespace %t/main.o %t/baz.dylib -o %t/out -t \ # RUN: --reproduce %t/repro.tar | FileCheck --check-prefix=T %s ## FIXME: The `bar.dylib` line should use `T-NEXT`, but on Windows we load ## libSystem.tbd with different slash styles and end up loading it twice @@ -68,7 +68,7 @@ # Undefined symbols should still cause errors by default. # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos \ # RUN: -o %t/main-with-undef.o %t/main-with-undef.s -# RUN: not %lld -flat_namespace -lSystem %t/main-with-undef.o %t/bar.dylib \ +# RUN: not %lld -flat_namespace %t/main-with-undef.o %t/bar.dylib \ # RUN: -o %t/out 2>&1 | FileCheck --check-prefix=UNDEF %s # UNDEF: error: undefined symbol: _quux diff --git a/lld/test/MachO/flat-namespace-interposable.s b/lld/test/MachO/flat-namespace-interposable.s --- a/lld/test/MachO/flat-namespace-interposable.s +++ b/lld/test/MachO/flat-namespace-interposable.s @@ -8,12 +8,12 @@ ## spurious bindings. # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/foo.o %t/foo.s -# RUN: %lld -lSystem -flat_namespace -o %t/foo %t/foo.o -# RUN: %lld -lSystem -flat_namespace -fixup_chains -o %t/chained %t/foo.o -# RUN: %lld -lSystem -dylib -flat_namespace -o %t/foo.dylib %t/foo.o -# RUN: %lld -lSystem -dylib -flat_namespace -fixup_chains -o %t/chained.dylib %t/foo.o -# RUN: %lld -lSystem -bundle -flat_namespace -o %t/foo.bundle %t/foo.o -# RUN: %lld -lSystem -bundle -flat_namespace -fixup_chains -o %t/chained.bundle %t/foo.o +# RUN: %lld -flat_namespace -o %t/foo %t/foo.o +# RUN: %lld -flat_namespace -fixup_chains -o %t/chained %t/foo.o +# RUN: %lld -dylib -flat_namespace -o %t/foo.dylib %t/foo.o +# RUN: %lld -dylib -flat_namespace -fixup_chains -o %t/chained.dylib %t/foo.o +# RUN: %lld -bundle -flat_namespace -o %t/foo.bundle %t/foo.o +# RUN: %lld -bundle -flat_namespace -fixup_chains -o %t/chained.bundle %t/foo.o # RUN: llvm-objdump --macho --syms --rebase --bind --lazy-bind --weak-bind %t/foo | \ # RUN: FileCheck %s --check-prefixes=SYMS,EXEC --implicit-check-not=_private_extern # RUN: llvm-objdump --macho --syms %t/chained >> %t/chained.objdump diff --git a/lld/test/MachO/force-load-swift-libs.ll b/lld/test/MachO/force-load-swift-libs.ll --- a/lld/test/MachO/force-load-swift-libs.ll +++ b/lld/test/MachO/force-load-swift-libs.ll @@ -6,22 +6,22 @@ ; RUN: llvm-as %t/lc-linker-opt.ll -o %t/lc-linker-opt.o ; RUN: llvm-as %t/no-lc-linker-opt.ll -o %t/no-lc-linker-opt.o -; RUN: %lld -lSystem -force_load_swift_libs -L%t %t/lc-linker-opt.o -o \ +; RUN: %lld -force_load_swift_libs -L%t %t/lc-linker-opt.o -o \ ; RUN: %t/lc-linker-opt -why_load 2>&1 | FileCheck %s --check-prefix=WHY-LOAD ; RUN: llvm-objdump --macho --syms %t/lc-linker-opt | FileCheck %s --check-prefix=HAS-SWIFT -; RUN: %lld -lSystem -L%t %t/lc-linker-opt.o -o %t/lc-linker-opt-no-force +; RUN: %lld -L%t %t/lc-linker-opt.o -o %t/lc-linker-opt-no-force ; RUN: llvm-objdump --macho --syms %t/lc-linker-opt-no-force | FileCheck %s --check-prefix=NO-SWIFT ;; Swift libraries passed on the CLI don't get force-loaded! -; RUN: %lld -lSystem -force_load_swift_libs -lswiftFoo -L%t %t/no-lc-linker-opt.o -o %t/no-lc-linker-opt +; RUN: %lld -force_load_swift_libs -lswiftFoo -L%t %t/no-lc-linker-opt.o -o %t/no-lc-linker-opt ; RUN: llvm-objdump --macho --syms %t/no-lc-linker-opt | FileCheck %s --check-prefix=NO-SWIFT ;; Moreover, if a Swift library is passed on the CLI, that supersedes any ;; LC_LINKER_OPTIONs that reference it. -; RUN: %lld -lSystem -force_load_swift_libs -lswiftFoo -L%t %t/lc-linker-opt.o -o %t/both-cli-and-lc-linker-opt +; RUN: %lld -force_load_swift_libs -lswiftFoo -L%t %t/lc-linker-opt.o -o %t/both-cli-and-lc-linker-opt ; RUN: llvm-objdump --macho --syms %t/both-cli-and-lc-linker-opt | FileCheck %s --check-prefix=NO-SWIFT -; RUN: %lld -lSystem -force_load_swift_libs -L%t %t/lc-linker-opt.o -lswiftFoo -o %t/both-cli-and-lc-linker-opt +; RUN: %lld -force_load_swift_libs -L%t %t/lc-linker-opt.o -lswiftFoo -o %t/both-cli-and-lc-linker-opt ; RUN: llvm-objdump --macho --syms %t/both-cli-and-lc-linker-opt | FileCheck %s --check-prefix=NO-SWIFT ; WHY-LOAD: LC_LINKER_OPTION forced load of {{.*}}libswiftFoo.a(swift-foo.o) diff --git a/lld/test/MachO/force-load.s b/lld/test/MachO/force-load.s --- a/lld/test/MachO/force-load.s +++ b/lld/test/MachO/force-load.s @@ -7,36 +7,36 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/foo.s -o %t/foo.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o -# RUN: %lld -lSystem -force_load %t/foo.a %t/foo.o %t/test.o -o %t/test-force-load-first +# RUN: %lld -force_load %t/foo.a %t/foo.o %t/test.o -o %t/test-force-load-first # FORCE-LOAD-FIRST: __TEXT,archive _foo # RUN: llvm-objdump --syms %t/test-force-load-first | FileCheck %s --check-prefix=FORCE-LOAD-FIRST -# RUN: %lld %t/foo.o -lSystem -force_load %t/foo.a %t/test.o -o %t/test-force-load-second +# RUN: %lld %t/foo.o -force_load %t/foo.a %t/test.o -o %t/test-force-load-second # RUN: llvm-objdump --syms %t/test-force-load-second | FileCheck %s --check-prefix=FORCE-LOAD-SECOND # FORCE-LOAD-SECOND: __TEXT,obj _foo ## If an archive has already been loaded w/o -force_load earlier in the command ## line, a later -force_load argument will not have an effect. -# RUN: %lld -lSystem %t/foo.a -force_load %t/foo.a %t/test.o -o %t/test-regular-then-force +# RUN: %lld %t/foo.a -force_load %t/foo.a %t/test.o -o %t/test-regular-then-force # RUN: llvm-objdump --syms %t/test-regular-then-force | FileCheck %s --check-prefix=REGULAR-THEN-FORCE # REGULAR-THEN-FORCE-NOT: _foo ## If the -force_load comes first, then the second load will just be a no-op. -# RUN: %lld -lSystem -force_load %t/foo.a %t/foo.a %t/test.o -o %t/test-force-then-regular +# RUN: %lld -force_load %t/foo.a %t/foo.a %t/test.o -o %t/test-force-then-regular # RUN: llvm-objdump --syms %t/test-force-then-regular | FileCheck %s --check-prefix=FORCE-THEN-REGULAR # FORCE-THEN-REGULAR: _foo ## Force-loading the same path twice is fine -# RUN: %lld -lSystem %t/foo.o -force_load %t/foo.a -force_load %t/foo.a %t/test.o -o /dev/null +# RUN: %lld %t/foo.o -force_load %t/foo.a -force_load %t/foo.a %t/test.o -o /dev/null ## Note that we do not call realpath() before dedup'ing the force-load ## arguments, so this is an error. -# RUN: cd %t; not %lld -lSystem %t/foo.o -force_load %t/foo.a -force_load foo.a \ +# RUN: cd %t; not %lld %t/foo.o -force_load %t/foo.a -force_load foo.a \ # RUN: %t/test.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=DUP # DUP: error: duplicate symbol: _bar ## Force-loading two different paths w/o conflicting symbols is fine -# RUN: %lld -lSystem -force_load %t/foo.a -force_load %t/baz.a %t/test.o -o %t/test-two-force-loads +# RUN: %lld -force_load %t/foo.a -force_load %t/baz.a %t/test.o -o %t/test-two-force-loads # RUN: llvm-objdump --syms %t/test-two-force-loads | FileCheck %s --check-prefix=TWICE # TWICE-DAG: __TEXT,archive _foo # TWICE-DAG: __TEXT,archive _bar diff --git a/lld/test/MachO/framework.s b/lld/test/MachO/framework.s --- a/lld/test/MachO/framework.s +++ b/lld/test/MachO/framework.s @@ -8,14 +8,14 @@ # RUN: ln -sf Versions/Current/Foo %t/Foo.framework/Foo # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o -# RUN: %lld -lSystem -F%t -framework Foo %t/test.o -o %t/test +# RUN: %lld -F%t -framework Foo %t/test.o -o %t/test # RUN: llvm-objdump --macho --lazy-bind %t/test | FileCheck %s --check-prefix=NOSUFFIX # NOSUFFIX: __DATA __la_symbol_ptr 0x{{[0-9a-f]*}} {{.*}}Foo _foo -# RUN: %lld -lSystem -F%t -framework Foo,baz %t/test.o -o %t/test-wrong-suffix +# RUN: %lld -F%t -framework Foo,baz %t/test.o -o %t/test-wrong-suffix # RUN: llvm-objdump --macho --lazy-bind %t/test-wrong-suffix | FileCheck %s --check-prefix=NOSUFFIX -# RUN: %lld -lSystem -F%t -framework Foo,bar %t/test.o -o %t/test-suffix +# RUN: %lld -F%t -framework Foo,bar %t/test.o -o %t/test-suffix # RUN: llvm-objdump --macho --lazy-bind %t/test-suffix | FileCheck %s --check-prefix=SUFFIX # SUFFIX: __DATA __la_symbol_ptr 0x{{[0-9a-f]*}} {{.*}}Foobar _foo diff --git a/lld/test/MachO/function-starts.s b/lld/test/MachO/function-starts.s --- a/lld/test/MachO/function-starts.s +++ b/lld/test/MachO/function-starts.s @@ -3,7 +3,7 @@ # RUN: rm -rf %t; split-file %s %t # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/basic.s -o %t/basic.o -# RUN: %lld -lSystem %t/basic.o -o %t/basic +# RUN: %lld %t/basic.o -o %t/basic # RUN: llvm-objdump --syms %t/basic > %t/objdump # RUN: llvm-objdump --macho --function-starts %t/basic >> %t/objdump # RUN: FileCheck %s --check-prefix=BASIC < %t/objdump @@ -18,7 +18,7 @@ # BASIC: [[#MAIN]] # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/alias.s -o %t/alias.o -# RUN: %lld -lSystem %t/alias.o -o %t/alias +# RUN: %lld %t/alias.o -o %t/alias # RUN: llvm-objdump --syms %t/alias > %t/objdump # RUN: llvm-objdump --macho --function-starts %t/alias >> %t/objdump # RUN: FileCheck %s --check-prefix=ALIAS < %t/objdump @@ -36,13 +36,13 @@ # NO-FUNCTION-STARTS: basic-no-function-starts: # NO-FUNCTION-STARTS-EMPTY: -# RUN: %lld -lSystem %t/basic.o -no_function_starts -function_starts -o %t/basic-explicit +# RUN: %lld %t/basic.o -no_function_starts -function_starts -o %t/basic-explicit # RUN: llvm-objdump --syms %t/basic > %t/objdump # RUN: llvm-objdump --macho --function-starts %t/basic >> %t/objdump # RUN: FileCheck %s --check-prefix=BASIC < %t/objdump # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/local.s -o %t/local.o -# RUN: %lld -lSystem %t/local.o -o %t/local +# RUN: %lld %t/local.o -o %t/local # RUN: llvm-objdump --syms %t/local > %t/objdump # RUN: llvm-objdump --macho --function-starts %t/local >> %t/objdump # RUN: FileCheck %s --check-prefix=LOCAL < %t/objdump diff --git a/lld/test/MachO/header.s b/lld/test/MachO/header.s --- a/lld/test/MachO/header.s +++ b/lld/test/MachO/header.s @@ -6,10 +6,10 @@ # RUN: llvm-mc -filetype=obj -triple=arm64_32-apple-watchos %s -o %t/arm64-32-test.o # RUN: llvm-mc -filetype=obj -triple=armv7-apple-watchos %s -o %t/arm-test.o -# RUN: %lld -lSystem -arch x86_64 -o %t/x86-64-executable %t/x86-64-test.o -# RUN: %lld -lSystem -arch arm64 -o %t/arm64-executable %t/arm64-test.o -# RUN: %lld-watchos -lSystem -o %t/arm64-32-executable %t/arm64-32-test.o -# RUN: %lld-watchos -lSystem -arch armv7 -o %t/arm-executable %t/arm-test.o +# RUN: %lld -arch x86_64 -o %t/x86-64-executable %t/x86-64-test.o +# RUN: %lld -arch arm64 -o %t/arm64-executable %t/arm64-test.o +# RUN: %lld-watchos -o %t/arm64-32-executable %t/arm64-32-test.o +# RUN: %lld-watchos -arch armv7 -o %t/arm-executable %t/arm-test.o # RUN: %lld -arch x86_64 -dylib -o %t/x86-64-dylib %t/x86-64-test.o diff --git a/lld/test/MachO/headerpad.s b/lld/test/MachO/headerpad.s --- a/lld/test/MachO/headerpad.s +++ b/lld/test/MachO/headerpad.s @@ -63,7 +63,7 @@ # RUN: llvm-objdump --macho --all-headers %t/libnull.dylib | FileCheck %s --check-prefix=PADMAX # RUN: %lld -o %t/libnull.dylib %t/null.o -dylib \ # RUN: -headerpad_max_install_names \ -# RUN: -lSystem -sub_library libSystem +# RUN: -sub_library libSystem # RUN: llvm-objdump --macho --all-headers %t/libnull.dylib | FileCheck %s --check-prefix=PADMAX # # PADMAX: magic {{.+}} ncmds sizeofcmds flags @@ -77,7 +77,7 @@ ################ All 3 kinds of LCDylib swamped by a larger override # RUN: %lld -o %t/libnull.dylib %t/null.o -dylib \ # RUN: -headerpad_max_install_names -headerpad 0x1001 \ -# RUN: -lSystem -sub_library libSystem +# RUN: -sub_library libSystem # RUN: llvm-objdump --macho --all-headers %t/libnull.dylib | FileCheck %s --check-prefix=PADOVR # # PADOVR: magic {{.+}} ncmds sizeofcmds flags diff --git a/lld/test/MachO/icf-arm64.s b/lld/test/MachO/icf-arm64.s --- a/lld/test/MachO/icf-arm64.s +++ b/lld/test/MachO/icf-arm64.s @@ -3,7 +3,7 @@ # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin19.0.0 %t/main.s -o %t/main.o # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin19.0.0 %t/f2.s -o %t/f2.o -# RUN: %lld -arch arm64 -lSystem --icf=all -o %t/main %t/main.o %t/f2.o +# RUN: %lld -arch arm64 --icf=all -o %t/main %t/main.o %t/f2.o # RUN: llvm-objdump -d --syms --print-imm-hex %t/main | FileCheck %s # CHECK-LABEL: SYMBOL TABLE: diff --git a/lld/test/MachO/icf-literals.s b/lld/test/MachO/icf-literals.s --- a/lld/test/MachO/icf-literals.s +++ b/lld/test/MachO/icf-literals.s @@ -1,7 +1,7 @@ # REQUIRES: x86 # RUN: rm -rf %t; mkdir %t # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/test.o -# RUN: %lld -lSystem --icf=all -o %t/test %t/test.o +# RUN: %lld --icf=all -o %t/test %t/test.o # RUN: llvm-objdump --macho --syms -d %t/test | FileCheck %s # CHECK: _main: diff --git a/lld/test/MachO/icf-options.s b/lld/test/MachO/icf-options.s --- a/lld/test/MachO/icf-options.s +++ b/lld/test/MachO/icf-options.s @@ -2,19 +2,19 @@ # RUN: rm -rf %t; mkdir %t # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/main.o -# RUN: %lld -lSystem --icf=all -o %t/all %t/main.o 2>&1 \ +# RUN: %lld --icf=all -o %t/all %t/main.o 2>&1 \ # RUN: | FileCheck %s --check-prefix=DIAG-EMPTY --allow-empty -# RUN: %lld -lSystem --icf=none -o %t/none %t/main.o 2>&1 \ +# RUN: %lld --icf=none -o %t/none %t/main.o 2>&1 \ # RUN: | FileCheck %s --check-prefix=DIAG-EMPTY --allow-empty -# RUN: %lld -lSystem -no_deduplicate -o %t/no_dedup %t/main.o 2>&1 \ +# RUN: %lld -no_deduplicate -o %t/no_dedup %t/main.o 2>&1 \ # RUN: | FileCheck %s --check-prefix=DIAG-EMPTY --allow-empty -# RUN: %lld -lSystem --icf=safe -o %t/safe %t/main.o 2>&1 \ +# RUN: %lld --icf=safe -o %t/safe %t/main.o 2>&1 \ # RUN: | FileCheck %s --check-prefix=DIAG-EMPTY --allow-empty -# RUN: not %lld -lSystem --icf=junk -o %t/junk %t/main.o 2>&1 \ +# RUN: not %lld --icf=junk -o %t/junk %t/main.o 2>&1 \ # RUN: | FileCheck %s --check-prefix=DIAG-JUNK -# RUN: %lld -lSystem --icf=all -no_deduplicate -o %t/none2 %t/main.o 2>&1 \ +# RUN: %lld --icf=all -no_deduplicate -o %t/none2 %t/main.o 2>&1 \ # RUN: | FileCheck %s --check-prefix=DIAG-EMPTY --allow-empty -# RUN: %lld -lSystem -no_deduplicate --icf=all -o %t/all2 %t/main.o 2>&1 \ +# RUN: %lld -no_deduplicate --icf=all -o %t/all2 %t/main.o 2>&1 \ # RUN: | FileCheck %s --check-prefix=DIAG-EMPTY --allow-empty # DIAG-EMPTY-NOT: {{.}} diff --git a/lld/test/MachO/icf-safe.ll b/lld/test/MachO/icf-safe.ll --- a/lld/test/MachO/icf-safe.ll +++ b/lld/test/MachO/icf-safe.ll @@ -3,14 +3,14 @@ ; RUN: rm -rf %t; mkdir %t ; RUN: llc -filetype=obj %s -O3 -o %t/icf-obj.o -enable-machine-outliner=never -mtriple arm64-apple-macos -addrsig -; RUN: %lld -arch arm64 -lSystem --icf=safe -dylib -o %t/icf-safe.dylib %t/icf-obj.o -; RUN: %lld -arch arm64 -lSystem --icf=all -dylib -o %t/icf-all.dylib %t/icf-obj.o +; RUN: %lld -arch arm64 --icf=safe -dylib -o %t/icf-safe.dylib %t/icf-obj.o +; RUN: %lld -arch arm64 --icf=all -dylib -o %t/icf-all.dylib %t/icf-obj.o ; RUN: llvm-objdump %t/icf-safe.dylib -d --macho | FileCheck %s --check-prefix=ICFSAFE ; RUN: llvm-objdump %t/icf-all.dylib -d --macho | FileCheck %s --check-prefix=ICFALL ; RUN: llvm-as %s -o %t/icf-bitcode.o -; RUN: %lld -arch arm64 -lSystem --icf=safe -dylib -o %t/icf-safe-bitcode.dylib %t/icf-bitcode.o -; RUN: %lld -arch arm64 -lSystem --icf=all -dylib -o %t/icf-all-bitcode.dylib %t/icf-bitcode.o +; RUN: %lld -arch arm64 --icf=safe -dylib -o %t/icf-safe-bitcode.dylib %t/icf-bitcode.o +; RUN: %lld -arch arm64 --icf=all -dylib -o %t/icf-all-bitcode.dylib %t/icf-bitcode.o ; RUN: llvm-objdump %t/icf-safe-bitcode.dylib -d --macho | FileCheck %s --check-prefix=ICFSAFE ; RUN: llvm-objdump %t/icf-all-bitcode.dylib -d --macho | FileCheck %s --check-prefix=ICFALL diff --git a/lld/test/MachO/icf-scale.s b/lld/test/MachO/icf-scale.s --- a/lld/test/MachO/icf-scale.s +++ b/lld/test/MachO/icf-scale.s @@ -2,7 +2,7 @@ # RUN: rm -rf %t* # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o -# RUN: %lld -lSystem --icf=all -o %t %t.o +# RUN: %lld --icf=all -o %t %t.o # RUN: llvm-objdump -d --syms %t | FileCheck %s ## When ICF has fewer than 1 Ki functions to segregate into equivalence classes, diff --git a/lld/test/MachO/icf-undef.s b/lld/test/MachO/icf-undef.s --- a/lld/test/MachO/icf-undef.s +++ b/lld/test/MachO/icf-undef.s @@ -4,12 +4,12 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin19.0.0 %t/test.s -o %t/test.o ## Check that we correctly dedup sections that reference dynamic-lookup symbols. -# RUN: %lld -lSystem -dylib --icf=all -undefined dynamic_lookup -o %t/test %t/test.o +# RUN: %lld -dylib --icf=all -undefined dynamic_lookup -o %t/test %t/test.o # RUN: llvm-objdump --macho --syms %t/test | FileCheck %s ## Check that we still raise an error when using regular undefined symbol ## treatment. -# RUN: not %lld -lSystem -dylib --icf=all -o /dev/null %t/test.o 2>&1 | \ +# RUN: not %lld -dylib --icf=all -o /dev/null %t/test.o 2>&1 | \ # RUN: FileCheck %s --check-prefix=ERR # CHECK: [[#%x,ADDR:]] l F __TEXT,__text _foo diff --git a/lld/test/MachO/icf.s b/lld/test/MachO/icf.s --- a/lld/test/MachO/icf.s +++ b/lld/test/MachO/icf.s @@ -9,7 +9,7 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin19.0.0 %t/main.s -o %t/main.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin19.0.0 %t/abs.s -o %t/abs.o -# RUN: %lld -lSystem --icf=all -o %t/main %t/main.o %t/abs.o +# RUN: %lld --icf=all -o %t/main %t/main.o %t/abs.o # RUN: llvm-objdump -d --syms --dwarf=frames %t/main | FileCheck %s # CHECK-LABEL: SYMBOL TABLE: diff --git a/lld/test/MachO/implicit-dylibs.s b/lld/test/MachO/implicit-dylibs.s --- a/lld/test/MachO/implicit-dylibs.s +++ b/lld/test/MachO/implicit-dylibs.s @@ -18,24 +18,24 @@ # RUN: echo "" | llvm-mc -filetype=obj -triple=x86_64-apple-darwin -o %t/libunused.o # RUN: echo "" | llvm-mc -filetype=obj -triple=x86_64-apple-darwin -o %t/reexporter.o -# RUN: %lld -dylib -lSystem %t/libfoo.o -o %t/libfoo.dylib -# RUN: %lld -dylib -lSystem %t/libtoplevel.o -o %t/usr/lib/libtoplevel.dylib -install_name /usr/lib/libtoplevel.dylib -# RUN: %lld -dylib -lSystem %t/libsublevel.o -o %t/usr/lib/system/libsublevel.dylib -install_name /usr/lib/system/libsublevel.dylib -# RUN: %lld -dylib -lSystem %t/libunused.o -o %t/usr/lib/libunused.dylib -install_name /usr/lib/libunused.dylib +# RUN: %lld -dylib %t/libfoo.o -o %t/libfoo.dylib +# RUN: %lld -dylib %t/libtoplevel.o -o %t/usr/lib/libtoplevel.dylib -install_name /usr/lib/libtoplevel.dylib +# RUN: %lld -dylib %t/libsublevel.o -o %t/usr/lib/system/libsublevel.dylib -install_name /usr/lib/system/libsublevel.dylib +# RUN: %lld -dylib %t/libunused.o -o %t/usr/lib/libunused.dylib -install_name /usr/lib/libunused.dylib ## Bar.framework is nested within Foo.framework. -# RUN: %lld -dylib -lSystem %t/framework-bar.o -o %t/System/Library/Frameworks/Foo.framework/Frameworks/Bar.framework/Versions/A/Bar \ +# RUN: %lld -dylib %t/framework-bar.o -o %t/System/Library/Frameworks/Foo.framework/Frameworks/Bar.framework/Versions/A/Bar \ # RUN: -install_name /System/Library/Frameworks/Foo.framework/Frameworks/Bar.framework/Versions/A/Bar # RUN: ln -sf Versions/A/Bar \ # RUN: %t/System/Library/Frameworks/Foo.framework/Frameworks/Bar.framework/Bar ## Have Foo re-export Bar. # RUN: %lld -dylib -F %t/System/Library/Frameworks/Foo.framework/Frameworks \ -# RUN: -framework Bar -sub_umbrella Bar -lSystem %t/framework-foo.o -o %t/System/Library/Frameworks/Foo.framework/Versions/A/Foo \ +# RUN: -framework Bar -sub_umbrella Bar %t/framework-foo.o -o %t/System/Library/Frameworks/Foo.framework/Versions/A/Foo \ # RUN: -install_name /System/Library/Frameworks/Foo.framework/Versions/A/Foo # RUN: ln -sf Versions/A/Foo %t/System/Library/Frameworks/Foo.framework/Foo -# RUN: %lld -dylib -lSystem %t/framework-baz.o -o %t/Baz.framework/Versions/A/Baz \ +# RUN: %lld -dylib %t/framework-baz.o -o %t/Baz.framework/Versions/A/Baz \ # RUN: -install_name %t/Baz.framework/Versions/A/Baz # RUN: ln -sf Versions/A/Baz %t/Baz.framework/Baz @@ -47,7 +47,7 @@ # RUN: %t/reexporter.o -o %t/libreexporter.dylib # RUN: llvm-mc -filetype obj -triple x86_64-apple-darwin %t/test.s -o %t/test.o -# RUN: %lld -syslibroot %t -o %t/test -lSystem -L%t -lreexporter %t/test.o +# RUN: %lld -syslibroot %t -o %t/test -L%t -lreexporter %t/test.o # RUN: llvm-objdump --bind --no-show-raw-insn -d %t/test | FileCheck %s # CHECK: Bind table: # CHECK-DAG: __DATA __data {{.*}} pointer 0 libreexporter _foo @@ -61,7 +61,7 @@ # RUN: llvm-otool -l %t/test | FileCheck %s \ # RUN: --check-prefix=LOAD -DDIR=%t --implicit-check-not LC_LOAD_DYLIB ## Check that we don't create duplicate LC_LOAD_DYLIBs. -# RUN: %lld -syslibroot %t -o %t/test -lSystem -L%t -lreexporter -ltoplevel %t/test.o +# RUN: %lld -syslibroot %t -o %t/test -L%t -lreexporter -ltoplevel %t/test.o # RUN: llvm-otool -l %t/test | FileCheck %s \ # RUN: --check-prefix=LOAD -DDIR=%t --implicit-check-not LC_LOAD_DYLIB @@ -81,7 +81,7 @@ # LOAD-NEXT: cmdsize # LOAD-NEXT: name /usr/lib/libtoplevel.dylib -# RUN: %lld -no_implicit_dylibs -syslibroot %t -o %t/no-implicit -lSystem -L%t -lreexporter %t/test.o +# RUN: %lld -no_implicit_dylibs -syslibroot %t -o %t/no-implicit -L%t -lreexporter %t/test.o # RUN: llvm-objdump --bind --no-show-raw-insn -d %t/no-implicit | FileCheck %s --check-prefix=NO-IMPLICIT # NO-IMPLICIT: Bind table: # NO-IMPLICIT-DAG: __DATA __data {{.*}} pointer 0 libreexporter _foo diff --git a/lld/test/MachO/init-offsets.s b/lld/test/MachO/init-offsets.s --- a/lld/test/MachO/init-offsets.s +++ b/lld/test/MachO/init-offsets.s @@ -4,7 +4,7 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/first.s -o %t/first.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/second.s -o %t/second.o -# RUN: %lld -lSystem -init_offsets -undefined dynamic_lookup %t/first.o %t/second.o -o %t/out +# RUN: %lld -init_offsets -undefined dynamic_lookup %t/first.o %t/second.o -o %t/out # RUN: llvm-otool -lv %t/out | FileCheck --check-prefix=FLAGS --implicit-check-not=__mod_init_func %s # RUN: llvm-otool -l %t/out > %t/dump.txt # RUN: llvm-objdump --macho --print-imm-hex --section=__TEXT,__stubs %t/out >> %t/dump.txt diff --git a/lld/test/MachO/lc-linker-option.ll b/lld/test/MachO/lc-linker-option.ll --- a/lld/test/MachO/lc-linker-option.ll +++ b/lld/test/MachO/lc-linker-option.ll @@ -2,7 +2,7 @@ ; RUN: rm -rf %t; split-file %s %t ; RUN: llvm-as %t/framework.ll -o %t/framework.o -; RUN: %lld -lSystem %t/framework.o -o %t/frame +; RUN: %lld %t/framework.o -o %t/frame ; RUN: llvm-otool -l %t/frame | FileCheck --check-prefix=FRAME %s \ ; RUN: --implicit-check-not LC_LOAD_DYLIB ; FRAME: cmd LC_LOAD_DYLIB diff --git a/lld/test/MachO/link-search-at-executable-path.s b/lld/test/MachO/link-search-at-executable-path.s --- a/lld/test/MachO/link-search-at-executable-path.s +++ b/lld/test/MachO/link-search-at-executable-path.s @@ -13,13 +13,13 @@ ## When linking executables, @executable_path/ in install_name should be replaced ## by the path of the executable. -# RUN: %lld -lSystem %t/main.o %t/libbar.dylib -o %t/subdir/test +# RUN: %lld %t/main.o %t/libbar.dylib -o %t/subdir/test ## This doesn't work for non-executables. -# RUN: not %lld -dylib -lSystem %t/main.o %t/libbar.dylib -o %t/subdir/libtest.dylib 2>&1 | FileCheck --check-prefix=ERR %s +# RUN: not %lld -dylib %t/main.o %t/libbar.dylib -o %t/subdir/libtest.dylib 2>&1 | FileCheck --check-prefix=ERR %s ## It also doesn't help if the needed reexport isn't next to the library. -# RUN: not %lld -lSystem %t/main.o %t/libbar.dylib -o %t/test 2>&1 | FileCheck --check-prefix=ERR %s +# RUN: not %lld %t/main.o %t/libbar.dylib -o %t/test 2>&1 | FileCheck --check-prefix=ERR %s # ERR: error: unable to locate re-export with install name @executable_path/libfoo.dylib #--- foo.s diff --git a/lld/test/MachO/link-search-at-loader-path-symlink.s b/lld/test/MachO/link-search-at-loader-path-symlink.s --- a/lld/test/MachO/link-search-at-loader-path-symlink.s +++ b/lld/test/MachO/link-search-at-loader-path-symlink.s @@ -19,7 +19,7 @@ # RUN: ln -sf A %t/Foo1.framework/Versions/Current # RUN: ln -sf Versions/Current/Foo1 %t/Foo1.framework/Foo1 -# RUN: %lld -lSystem -F%t -framework Foo1 %t/test.o -o %t/test1 +# RUN: %lld -F%t -framework Foo1 %t/test.o -o %t/test1 ## 2. Test symlink with reexport to @loader_path-relative path directly. ## The @loader_path-relative path is looked after resolving the symlink. @@ -35,7 +35,7 @@ # RUN: ln -sf A %t/Foo2.framework/Versions/Current # RUN: ln -sf Versions/Current/Foo2 %t/Foo2.framework/Foo2 -# RUN: %lld -lSystem -F%t -framework Foo2 %t/test.o -o %t/test2 +# RUN: %lld -F%t -framework Foo2 %t/test.o -o %t/test2 #--- foo.s .globl _foo diff --git a/lld/test/MachO/link-search-at-loader-path.s b/lld/test/MachO/link-search-at-loader-path.s --- a/lld/test/MachO/link-search-at-loader-path.s +++ b/lld/test/MachO/link-search-at-loader-path.s @@ -12,8 +12,8 @@ ## Test that @loader_path is replaced by the actual path, not by install_name. # RUN: %lld -dylib -reexport_library %t/subdir/libfoo.dylib -install_name /tmp/libbar.dylib %t/bar.o -o %t/subdir/libbar.dylib -# RUN: %lld -lSystem %t/main.o %t/subdir/libbar.dylib -o %t/test -# RUN: %lld -dylib -lSystem %t/main.o %t/subdir/libbar.dylib -o %t/libtest.dylib +# RUN: %lld %t/main.o %t/subdir/libbar.dylib -o %t/test +# RUN: %lld -dylib %t/main.o %t/subdir/libbar.dylib -o %t/libtest.dylib #--- foo.s .globl _foo diff --git a/lld/test/MachO/link-search-at-rpath.s b/lld/test/MachO/link-search-at-rpath.s --- a/lld/test/MachO/link-search-at-rpath.s +++ b/lld/test/MachO/link-search-at-rpath.s @@ -16,8 +16,8 @@ # RUN: -rpath @loader_path/../foo \ # RUN: %t/bar.o -o %t/subdir2/libbar.dylib -# RUN: %lld -lSystem %t/main.o %t/subdir2/libbar.dylib -o %t/test -# RUN: %lld -dylib -lSystem %t/main.o %t/subdir2/libbar.dylib -o %t/libtest.dylib +# RUN: %lld %t/main.o %t/subdir2/libbar.dylib -o %t/test +# RUN: %lld -dylib %t/main.o %t/subdir2/libbar.dylib -o %t/libtest.dylib #--- foo.s .globl _foo diff --git a/lld/test/MachO/linkedit-contiguity.s b/lld/test/MachO/linkedit-contiguity.s --- a/lld/test/MachO/linkedit-contiguity.s +++ b/lld/test/MachO/linkedit-contiguity.s @@ -11,10 +11,10 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o -# RUN: %lld -lSystem -adhoc_codesign -o %t/test %t/libfoo.dylib %t/test.o +# RUN: %lld -adhoc_codesign -o %t/test %t/libfoo.dylib %t/test.o # RUN: llvm-objdump --macho --all-headers %t/test | FileCheck --check-prefixes=CHECK,OPCODE %s -# RUN: %lld -lSystem -adhoc_codesign -fixup_chains -o %t/chained_test %t/libfoo.dylib %t/test.o +# RUN: %lld -adhoc_codesign -fixup_chains -o %t/chained_test %t/libfoo.dylib %t/test.o # RUN: llvm-objdump --macho --all-headers %t/chained_test | FileCheck --check-prefixes=CHECK,CHAINED %s # CHECK: segname __LINKEDIT diff --git a/lld/test/MachO/load-hidden.ll b/lld/test/MachO/load-hidden.ll --- a/lld/test/MachO/load-hidden.ll +++ b/lld/test/MachO/load-hidden.ll @@ -4,7 +4,7 @@ ; RUN: llvm-ar rcs %t/archive.a %t/archive.o ; RUN: llvm-as %t/obj.ll -o %t/obj.o -; RUN: %lld -dylib -lSystem %t/obj.o -load_hidden %t/archive.a -o %t/test.dylib +; RUN: %lld -dylib %t/obj.o -load_hidden %t/archive.a -o %t/test.dylib ; RUN: llvm-nm %t/test.dylib | FileCheck %s ; CHECK: t _foo diff --git a/lld/test/MachO/load-hidden.s b/lld/test/MachO/load-hidden.s --- a/lld/test/MachO/load-hidden.s +++ b/lld/test/MachO/load-hidden.s @@ -7,48 +7,48 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/obj.s -o %t/obj.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/obj-bar.s -o %t/obj-bar.o -# RUN: %lld -dylib -lSystem %t/obj.o -load_hidden %t/libfoo.a -o %t/test.dylib +# RUN: %lld -dylib %t/obj.o -load_hidden %t/libfoo.a -o %t/test.dylib # RUN: llvm-nm %t/test.dylib | FileCheck %s -# RUN: %lld -dylib -lSystem -L%t %t/obj.o -hidden-lfoo -o %t/test2.dylib +# RUN: %lld -dylib -L%t %t/obj.o -hidden-lfoo -o %t/test2.dylib # RUN: llvm-nm %t/test2.dylib | FileCheck %s # CHECK-DAG: t _foo # CHECK-DAG: d _bar ## If an archive has already been loaded without -load_hidden earlier in the command line, ## -load_hidden does not have an effect. -# RUN: %lld -dylib -lSystem %t/obj.o %t/libfoo.a -load_hidden %t/libfoo.a -o %t/test-regular-then-hidden.dylib +# RUN: %lld -dylib %t/obj.o %t/libfoo.a -load_hidden %t/libfoo.a -o %t/test-regular-then-hidden.dylib # RUN: llvm-nm %t/test-regular-then-hidden.dylib | FileCheck %s --check-prefix=REGULAR-THEN-HIDDEN # REGULAR-THEN-HIDDEN-DAG: T _foo # REGULAR-THEN-HIDDEN-DAG: D _bar ## If -load_hidden comes first, the symbols will have hidden visibility. -# RUN: %lld -dylib -lSystem %t/obj.o -load_hidden %t/libfoo.a %t/libfoo.a -o %t/test-hidden-then-regular.dylib +# RUN: %lld -dylib %t/obj.o -load_hidden %t/libfoo.a %t/libfoo.a -o %t/test-hidden-then-regular.dylib # RUN: llvm-nm %t/test-hidden-then-regular.dylib | FileCheck %s --check-prefix=HIDDEN-THEN-REGULAR # HIDDEN-THEN-REGULAR-DAG: t _foo # HIDDEN-THEN-REGULAR-DAG: d _bar ## If both -load_hidden and -force_load are specified, the earlier one will have an effect. -# RUN: %lld -dylib -lSystem %t/obj.o %t/libfoo.a -force_load %t/libbaz.a -load_hidden %t/libbaz.a -o %t/test-force-then-hidden.dylib +# RUN: %lld -dylib %t/obj.o %t/libfoo.a -force_load %t/libbaz.a -load_hidden %t/libbaz.a -o %t/test-force-then-hidden.dylib # RUN: llvm-nm %t/test-force-then-hidden.dylib | FileCheck %s --check-prefix=FORCE-THEN-HIDDEN # FORCE-THEN-HIDDEN: T _baz -# RUN: %lld -dylib -lSystem %t/obj.o %t/libfoo.a -load_hidden %t/libbaz.a -force_load %t/libbaz.a -o %t/test-hidden-then-force.dylib +# RUN: %lld -dylib %t/obj.o %t/libfoo.a -load_hidden %t/libbaz.a -force_load %t/libbaz.a -o %t/test-hidden-then-force.dylib # RUN: llvm-nm %t/test-hidden-then-force.dylib | FileCheck %s --check-prefix=HIDDEN-THEN-FORCE # HIDDEN-THEN-FORCE-NOT: _baz ## -load_hidden does not cause the library to be loaded eagerly. -# RUN: %lld -dylib -lSystem %t/obj.o -load_hidden %t/libfoo.a -load_hidden %t/libbaz.a -o %t/test-lazy.dylib +# RUN: %lld -dylib %t/obj.o -load_hidden %t/libfoo.a -load_hidden %t/libbaz.a -o %t/test-lazy.dylib # RUN: llvm-nm %t/test-lazy.dylib | FileCheck %s --check-prefix=LAZY # LAZY-NOT: _baz ## Specifying the same library twice is fine. -# RUN: %lld -dylib -lSystem %t/obj.o -load_hidden %t/libfoo.a -load_hidden %t/libfoo.a -o %t/test-twice.dylib +# RUN: %lld -dylib %t/obj.o -load_hidden %t/libfoo.a -load_hidden %t/libfoo.a -o %t/test-twice.dylib # RUN: llvm-nm %t/test-twice.dylib | FileCheck %s --check-prefix=TWICE # TWICE-DAG: t _foo # TWICE-DAG: d _bar ## -load_hidden causes the symbols to have "private external" visibility, so duplicate definitions ## are not allowed. -# RUN: not %lld -dylib -lSystem %t/obj.o %t/obj-bar.o -load_hidden %t/libfoo.a 2>&1 | FileCheck %s --check-prefix=DUP +# RUN: not %lld -dylib %t/obj.o %t/obj-bar.o -load_hidden %t/libfoo.a 2>&1 | FileCheck %s --check-prefix=DUP # DUP: error: duplicate symbol: _bar #--- archive-foo.s diff --git a/lld/test/MachO/local-got.s b/lld/test/MachO/local-got.s --- a/lld/test/MachO/local-got.s +++ b/lld/test/MachO/local-got.s @@ -2,13 +2,13 @@ # RUN: mkdir -p %t # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %p/Inputs/libhello.s \ # RUN: -o %t/libhello.o -# RUN: %lld -lSystem -dylib -install_name \ +# RUN: %lld -dylib -install_name \ # RUN: @executable_path/libhello.dylib %t/libhello.o -o %t/libhello.dylib # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/test.o -# RUN: %lld -lSystem -o %t/test %t/test.o -L%t -lhello +# RUN: %lld -o %t/test %t/test.o -L%t -lhello # RUN: llvm-objdump --macho --full-contents --rebase --bind %t/test | FileCheck %s --check-prefixes=CHECK,PIE --match-full-lines -# RUN: %lld -no_pie -data_const -lSystem -o %t/test %t/test.o -L%t -lhello +# RUN: %lld -no_pie -data_const -o %t/test %t/test.o -L%t -lhello # RUN: llvm-objdump --macho --full-contents --rebase --bind %t/test | FileCheck %s --check-prefixes=CHECK,NO-PIE --match-full-lines ## Check that the GOT references the cstrings. --full-contents displays the diff --git a/lld/test/MachO/lto-archive.ll b/lld/test/MachO/lto-archive.ll --- a/lld/test/MachO/lto-archive.ll +++ b/lld/test/MachO/lto-archive.ll @@ -9,20 +9,20 @@ ; RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/main.s -o %t/main.o ; RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/references-foo.s -o %t/references-foo.o -; RUN: %lld -lSystem %t/references-foo.o %t/foo.a -o /dev/null -why_load | FileCheck %s --check-prefix=FOO +; RUN: %lld %t/references-foo.o %t/foo.a -o /dev/null -why_load | FileCheck %s --check-prefix=FOO ; FOO: _foo forced load of {{.+}}foo.a(foo.o) -; RUN: %lld -lSystem -force_load %t/foo.a %t/main.o -o /dev/null -why_load | FileCheck %s --check-prefix=FORCE-LOAD +; RUN: %lld -force_load %t/foo.a %t/main.o -o /dev/null -why_load | FileCheck %s --check-prefix=FORCE-LOAD ; FORCE-LOAD: -force_load forced load of {{.+}}foo.a(foo.o) -; RUN: %lld -lSystem -ObjC -framework CoreFoundation %t/objc.a %t/main.o \ +; RUN: %lld -ObjC -framework CoreFoundation %t/objc.a %t/main.o \ ; RUN: -o /dev/null -why_load | FileCheck %s --check-prefix=OBJC ; OBJC: _OBJC_CLASS_$_Foo forced load of {{.+}}objc.a(has-objc-symbol.o) ; OBJC: -ObjC forced load of {{.+}}objc.a(has-objc-category.o) -; RUN: %lld -lSystem %t/foo.a %t/main.o -o %t/no-force-load -why_load | count 0 +; RUN: %lld %t/foo.a %t/main.o -o %t/no-force-load -why_load | count 0 -; RUN: %lld -lSystem -framework CoreFoundation %t/objc.a %t/main.o -o %t/no-objc -why_load | count 0 +; RUN: %lld -framework CoreFoundation %t/objc.a %t/main.o -o %t/no-objc -why_load | count 0 ;--- foo.ll diff --git a/lld/test/MachO/lto-codemodel.ll b/lld/test/MachO/lto-codemodel.ll --- a/lld/test/MachO/lto-codemodel.ll +++ b/lld/test/MachO/lto-codemodel.ll @@ -1,7 +1,7 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o -; RUN: %lld -lSystem %t.o -o %ts -mllvm -code-model=small -; RUN: %lld -lSystem %t.o -o %tl -mllvm -code-model=large +; RUN: %lld %t.o -o %ts -mllvm -code-model=small +; RUN: %lld %t.o -o %tl -mllvm -code-model=large ; RUN: llvm-objdump --no-print-imm-hex -d %ts | FileCheck %s --check-prefix=CHECK-SMALL ; RUN: llvm-objdump --no-print-imm-hex -d %tl | FileCheck %s --check-prefix=CHECK-LARGE diff --git a/lld/test/MachO/lto-explicit-exports.ll b/lld/test/MachO/lto-explicit-exports.ll --- a/lld/test/MachO/lto-explicit-exports.ll +++ b/lld/test/MachO/lto-explicit-exports.ll @@ -8,7 +8,7 @@ ; RUN: llvm-as %t/foo.ll -o %t/foo.o ; RUN: llvm-as %t/refs-foo.ll -o %t/refs-foo.o -; RUN: %lld -lSystem -dylib %t/foo.o %t/refs-foo.o -o %t/test-fulllto \ +; RUN: %lld -dylib %t/foo.o %t/refs-foo.o -o %t/test-fulllto \ ; RUN: -save-temps -exported_symbol _refs_foo -exported_symbol _same_module_caller ; RUN: llvm-dis %t/test-fulllto.0.2.internalize.bc -o - | FileCheck %s --check-prefix=FULLLTO @@ -34,7 +34,7 @@ ; RUN: opt -module-summary %t/foo.ll -o %t/foo.thinlto.o ; RUN: opt -module-summary %t/refs-foo.ll -o %t/refs-foo.thinlto.o -; RUN: %lld -lSystem -dylib %t/foo.thinlto.o %t/refs-foo.thinlto.o -o %t/test-thinlto \ +; RUN: %lld -dylib %t/foo.thinlto.o %t/refs-foo.thinlto.o -o %t/test-thinlto \ ; RUN: -save-temps -exported_symbol _refs_foo -exported_symbol _same_module_caller ; RUN: llvm-dis %t/foo.thinlto.o.2.internalize.bc -o - | FileCheck %s --check-prefix=THINLTO-FOO diff --git a/lld/test/MachO/lto-final-definition.ll b/lld/test/MachO/lto-final-definition.ll --- a/lld/test/MachO/lto-final-definition.ll +++ b/lld/test/MachO/lto-final-definition.ll @@ -1,9 +1,9 @@ ; REQUIRES: x86 ; RUN: rm -rf %t; mkdir %t ; RUN: llvm-as %s -o %t/test.o -; RUN: %lld -lSystem -dylib %t/test.o -o %t/test -save-temps +; RUN: %lld -dylib %t/test.o -o %t/test -save-temps ; RUN: llvm-dis %t/test.0.2.internalize.bc -o - | FileCheck %s -; RUN: %lld -lSystem -dylib %t/test.o -o %t/flat-namespace.dylib -save-temps \ +; RUN: %lld -dylib %t/test.o -o %t/flat-namespace.dylib -save-temps \ ; RUN: -flat_namespace ; RUN: llvm-dis %t/flat-namespace.dylib.0.2.internalize.bc -o - | FileCheck %s \ ; RUN: --check-prefix=NO-DSO-LOCAL diff --git a/lld/test/MachO/lto-internalize-unnamed-addr.ll b/lld/test/MachO/lto-internalize-unnamed-addr.ll --- a/lld/test/MachO/lto-internalize-unnamed-addr.ll +++ b/lld/test/MachO/lto-internalize-unnamed-addr.ll @@ -7,21 +7,21 @@ ; RUN: opt -module-summary %t/test.ll -o %t/test.thinlto.o ; RUN: opt -module-summary %t/test2.ll -o %t/test2.thinlto.o -; RUN: %lld -lSystem %t/test.o %t/test2.o -o %t/test -save-temps +; RUN: %lld %t/test.o %t/test2.o -o %t/test -save-temps ; RUN: llvm-dis < %t/test.0.2.internalize.bc | FileCheck %s --check-prefix=LTO-BC ; RUN: llvm-nm -m %t/test | FileCheck %s --check-prefix=LTO -; RUN: %lld -lSystem -dylib %t/test.o %t/test2.o -o %t/test.dylib -save-temps +; RUN: %lld -dylib %t/test.o %t/test2.o -o %t/test.dylib -save-temps ; RUN: llvm-dis < %t/test.dylib.0.2.internalize.bc | FileCheck %s --check-prefix=LTO-BC-DYLIB ; RUN: llvm-nm -m %t/test.dylib | FileCheck %s --check-prefix=LTO-DYLIB -; RUN: %lld -lSystem %t/test.thinlto.o %t/test2.thinlto.o -o %t/test.thinlto \ +; RUN: %lld %t/test.thinlto.o %t/test2.thinlto.o -o %t/test.thinlto \ ; RUN: -save-temps ; RUN: llvm-dis < %t/test.thinlto.o.2.internalize.bc | FileCheck %s --check-prefix=THINLTO-BC ; RUN: llvm-dis < %t/test2.thinlto.o.2.internalize.bc | FileCheck %s --check-prefix=THINLTO-BC-2 ; RUN: llvm-nm -m %t/test.thinlto | FileCheck %s --check-prefix=THINLTO -; RUN: %lld -lSystem -dylib %t/test.thinlto.o %t/test2.thinlto.o -o \ +; RUN: %lld -dylib %t/test.thinlto.o %t/test2.thinlto.o -o \ ; RUN: %t/test.thinlto.dylib -save-temps ; RUN: llvm-dis < %t/test.thinlto.o.2.internalize.bc | FileCheck %s --check-prefix=THINLTO-BC ; RUN: llvm-dis < %t/test2.thinlto.o.2.internalize.bc | FileCheck %s --check-prefix=THINLTO-BC-2 diff --git a/lld/test/MachO/lto-internalize.ll b/lld/test/MachO/lto-internalize.ll --- a/lld/test/MachO/lto-internalize.ll +++ b/lld/test/MachO/lto-internalize.ll @@ -8,7 +8,7 @@ ; RUN: llvm-as %t/test.s -o %t/test.o ; RUN: llvm-as %t/baz.s -o %t/baz.o ; RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/regular.s -o %t/regular.o -; RUN: %lld -lSystem %t/test.o %t/baz.o %t/regular.o -o %t/test -save-temps +; RUN: %lld %t/test.o %t/baz.o %t/regular.o -o %t/test -save-temps ; RUN: llvm-dis < %t/test.0.2.internalize.bc | FileCheck %s ; RUN: llvm-objdump --macho --syms %t/test | FileCheck %s --check-prefix=SYMTAB @@ -39,12 +39,12 @@ ; SYMTAB-DAG: *UND* dyld_stub_binder ; SYMTAB-EMPTY: -; RUN: %lld -lSystem -dylib %t/test.o %t/baz.o %t/regular.o -o %t/test.dylib -save-temps +; RUN: %lld -dylib %t/test.o %t/baz.o %t/regular.o -o %t/test.dylib -save-temps ; RUN: llvm-dis < %t/test.dylib.0.2.internalize.bc | FileCheck %s --check-prefix=DYN ; RUN: llvm-nm -m %t/test.dylib | FileCheck %s --check-prefix=DYN-SYMS \ ; RUN: --implicit-check-not _foo -; RUN: %lld -lSystem -export_dynamic %t/test.o %t/baz.o %t/regular.o -o %t/test.extdyn -save-temps +; RUN: %lld -export_dynamic %t/test.o %t/baz.o %t/regular.o -o %t/test.extdyn -save-temps ; RUN: llvm-dis < %t/test.extdyn.0.2.internalize.bc ; RUN: llvm-nm -m %t/test.extdyn | FileCheck %s --check-prefix=DYN-SYMS \ ; RUN: --implicit-check-not _foo diff --git a/lld/test/MachO/lto-linkonce.ll b/lld/test/MachO/lto-linkonce.ll --- a/lld/test/MachO/lto-linkonce.ll +++ b/lld/test/MachO/lto-linkonce.ll @@ -2,9 +2,9 @@ ; RUN: rm -rf %t; split-file %s %t ; RUN: opt -module-summary %t/first.ll -o %t/first.o ; RUN: opt -module-summary %t/second.ll -o %t/second.o -; RUN: %lld -dylib -lSystem %t/first.o %t/second.o -o %t/12 +; RUN: %lld -dylib %t/first.o %t/second.o -o %t/12 ; RUN: llvm-objdump --syms %t/12 | FileCheck %s --check-prefix=FIRST -; RUN: %lld -dylib -lSystem %t/second.o %t/first.o -o %t/21 +; RUN: %lld -dylib %t/second.o %t/first.o -o %t/21 ; RUN: llvm-objdump --syms %t/21 | FileCheck %s --check-prefix=SECOND ; FIRST: w O __TEXT,first _foo diff --git a/lld/test/MachO/lto-obj-weak-def.ll b/lld/test/MachO/lto-obj-weak-def.ll --- a/lld/test/MachO/lto-obj-weak-def.ll +++ b/lld/test/MachO/lto-obj-weak-def.ll @@ -14,7 +14,7 @@ ; COM: obj2yaml %t/foo-2-r.o -o %S/Inputs/lto-obj-weak-def.yaml ; RUN: yaml2obj %S/Inputs/lto-obj-weak-def.yaml -o %t/foo-2-r.o -; RUN: %lld -lSystem -dylib %t/foo-1.o %t/foo-2-r.o -o /dev/null +; RUN: %lld -dylib %t/foo-1.o %t/foo-2-r.o -o /dev/null ;--- foo-1.ll diff --git a/lld/test/MachO/lto-objc-arc-contract.ll b/lld/test/MachO/lto-objc-arc-contract.ll --- a/lld/test/MachO/lto-objc-arc-contract.ll +++ b/lld/test/MachO/lto-objc-arc-contract.ll @@ -5,11 +5,11 @@ ;; which doesn't know how to handle it. ; RUN: llvm-as %s -o %t.o -; RUN: %lld -dylib -lSystem %t.o -o %t --no-lto-legacy-pass-manager +; RUN: %lld -dylib %t.o -o %t --no-lto-legacy-pass-manager ; RUN: llvm-objdump -d %t | FileCheck %s ; RUN: opt -module-summary %s -o %t.o -; RUN: %lld -dylib -lSystem %t.o -o %t --no-lto-legacy-pass-manager +; RUN: %lld -dylib %t.o -o %t --no-lto-legacy-pass-manager ; RUN: llvm-objdump -d %t | FileCheck %s ; CHECK: <_foo>: diff --git a/lld/test/MachO/lto-symbol-resolution.ll b/lld/test/MachO/lto-symbol-resolution.ll --- a/lld/test/MachO/lto-symbol-resolution.ll +++ b/lld/test/MachO/lto-symbol-resolution.ll @@ -8,54 +8,54 @@ ; RUN: opt -module-summary %t/calls-foo.ll -o %t/calls-foo.o ; RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/weak-defined.s -o %t/weak-defined-asm.o -; RUN: %lld -lSystem -dylib %t/defined.o -o %t/libfoo.dylib -; RUN: %lld -lSystem -dylib %t/weak-defined.o -o %t/libweakfoo.dylib +; RUN: %lld -dylib %t/defined.o -o %t/libfoo.dylib +; RUN: %lld -dylib %t/weak-defined.o -o %t/libweakfoo.dylib ; RUN: llvm-ar rcs %t/archive.a %t/archive.o ;; Regular defined symbols take precedence over weak ones. -; RUN: %lld -lSystem %t/defined.o %t/weak-defined.o %t/calls-foo.o -o %t/test +; RUN: %lld %t/defined.o %t/weak-defined.o %t/calls-foo.o -o %t/test ; RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=DEFINED -; RUN: %lld -lSystem %t/weak-defined.o %t/defined.o %t/calls-foo.o -o %t/test +; RUN: %lld %t/weak-defined.o %t/defined.o %t/calls-foo.o -o %t/test ; RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=DEFINED ;; Regular defined symbols take precedence over weak non-bitcode ones. -; RUN: %lld -lSystem %t/defined.o %t/weak-defined-asm.o %t/calls-foo.o -o %t/test +; RUN: %lld %t/defined.o %t/weak-defined-asm.o %t/calls-foo.o -o %t/test ; RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=DEFINED -; RUN: %lld -lSystem %t/weak-defined-asm.o %t/defined.o %t/calls-foo.o -o %t/test +; RUN: %lld %t/weak-defined-asm.o %t/defined.o %t/calls-foo.o -o %t/test ; RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=DEFINED ;; NOTE: we are deviating from ld64's behavior here. ;; ld64: Weak non-bitcode symbols take precedence over weak bitcode ones. ;; lld: Weak non-bitcode symbols have the same precedence as weak bitcode ones. -; RUN: %lld -lSystem %t/weak-defined.o %t/weak-defined-asm.o %t/calls-foo.o -o %t/test +; RUN: %lld %t/weak-defined.o %t/weak-defined-asm.o %t/calls-foo.o -o %t/test ; RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=WEAK-DEFINED ; COM (ld64): llvm-objdump --syms %t/test | FileCheck %s --check-prefix=WEAK-DEFINED-ASM -; RUN: %lld -lSystem %t/weak-defined-asm.o %t/weak-defined.o %t/calls-foo.o -o %t/test +; RUN: %lld %t/weak-defined-asm.o %t/weak-defined.o %t/calls-foo.o -o %t/test ; RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=WEAK-DEFINED-ASM ;; Weak defined symbols take precedence over dylib symbols. -; RUN: %lld -lSystem %t/weak-defined.o %t/libfoo.dylib %t/calls-foo.o -o %t/test +; RUN: %lld %t/weak-defined.o %t/libfoo.dylib %t/calls-foo.o -o %t/test ; RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=WEAK-DEFINED -; RUN: %lld -lSystem %t/libfoo.dylib %t/weak-defined.o %t/calls-foo.o -o %t/test +; RUN: %lld %t/libfoo.dylib %t/weak-defined.o %t/calls-foo.o -o %t/test ; RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=WEAK-DEFINED ;; Weak defined symbols take precedence over archive symbols. -; RUN: %lld -lSystem %t/archive.a %t/weak-defined.o %t/calls-foo.o -o %t/test +; RUN: %lld %t/archive.a %t/weak-defined.o %t/calls-foo.o -o %t/test ; RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=WEAK-DEFINED -; RUN: %lld -lSystem %t/weak-defined.o %t/archive.a %t/calls-foo.o -o %t/test +; RUN: %lld %t/weak-defined.o %t/archive.a %t/calls-foo.o -o %t/test ; RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=WEAK-DEFINED ;; Archive symbols have the same precedence as dylib symbols. -; RUN: %lld -lSystem %t/archive.a %t/libfoo.dylib %t/calls-foo.o -o %t/test +; RUN: %lld %t/archive.a %t/libfoo.dylib %t/calls-foo.o -o %t/test ; RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=ARCHIVE -; RUN: %lld -lSystem %t/libfoo.dylib %t/archive.a %t/calls-foo.o -o %t/test +; RUN: %lld %t/libfoo.dylib %t/archive.a %t/calls-foo.o -o %t/test ; RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=DYLIB ;; Archive symbols take precedence over weak dylib symbols. -; RUN: %lld -lSystem %t/archive.a %t/libweakfoo.dylib %t/calls-foo.o -o %t/test +; RUN: %lld %t/archive.a %t/libweakfoo.dylib %t/calls-foo.o -o %t/test ; RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=ARCHIVE -; RUN: %lld -lSystem %t/libweakfoo.dylib %t/archive.a %t/calls-foo.o -o %t/test +; RUN: %lld %t/libweakfoo.dylib %t/archive.a %t/calls-foo.o -o %t/test ; RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=ARCHIVE ; DEFINED: g O __TEXT,defined _foo diff --git a/lld/test/MachO/lto-weak-ref.ll b/lld/test/MachO/lto-weak-ref.ll --- a/lld/test/MachO/lto-weak-ref.ll +++ b/lld/test/MachO/lto-weak-ref.ll @@ -3,17 +3,17 @@ ; RUN: rm -rf %t; split-file %s %t ; RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/dylib.s -o %t/dylib.o -; RUN: %lld -dylib -lSystem %t/dylib.o -o %t/dylib.dylib +; RUN: %lld -dylib %t/dylib.o -o %t/dylib.dylib ;; As baseline, compile the .ll file to a real .o file and check behavior. ; RUN: llc -filetype=obj %t/weak-ref.ll -o %t/obj.o -; RUN: %lld -dylib -lSystem %t/obj.o %t/dylib.dylib -o %t/test.obj +; RUN: %lld -dylib %t/obj.o %t/dylib.dylib -o %t/test.obj ; RUN: llvm-objdump --macho --syms %t/test.obj | FileCheck %s --check-prefixes=WEAK-REF ;; Check that we get the same behavior compiling the .ll file to a bitcode .o ;; file and linking that. ; RUN: opt -module-summary %t/weak-ref.ll -o %t/bitcode.o -; RUN: %lld -dylib -lSystem %t/bitcode.o %t/dylib.dylib -o %t/test.lto +; RUN: %lld -dylib %t/bitcode.o %t/dylib.dylib -o %t/test.lto ; RUN: llvm-objdump --macho --syms %t/test.lto | FileCheck %s --check-prefixes=WEAK-REF ; WEAK-REF: SYMBOL TABLE: diff --git a/lld/test/MachO/mh-header-link.s b/lld/test/MachO/mh-header-link.s --- a/lld/test/MachO/mh-header-link.s +++ b/lld/test/MachO/mh-header-link.s @@ -21,7 +21,7 @@ ## Test that in an executable, we can link against __mh_execute_header # RUN: llvm-mc %t/main.s -triple=x86_64-apple-macos10.15 -filetype=obj -o %t/exec.o -# RUN: %lld -dead_strip -lSystem %t/exec.o -o %t/exec.out +# RUN: %lld -dead_strip %t/exec.o -o %t/exec.out ## But it would be an error trying to reference __mh_execute_header in a dylib # RUN: not %lld -o /dev/null -dylib %t/exec.o 2>&1 | FileCheck %s --check-prefix ERR-EXEC diff --git a/lld/test/MachO/no-pie.s b/lld/test/MachO/no-pie.s --- a/lld/test/MachO/no-pie.s +++ b/lld/test/MachO/no-pie.s @@ -5,10 +5,10 @@ # RUN: llvm-mc -filetype=obj -triple=arm64e-apple-darwin %s -o %t.arm64e.o # RUN: llvm-mc -filetype=obj -triple=arm64_32-apple-watchos %s -o %t.arm64_32.o -# RUN: %lld -arch x86_64 -lSystem -no_pie -o %t %t.x86_64.o -# RUN: not %lld -arch arm64 -lSystem -no_pie -o %t %t.arm64.o 2>&1 | FileCheck %s -# RUN: not %lld -arch arm64e -lSystem -no_pie -o %t %t.arm64e.o 2>&1 | FileCheck %s -# RUN: not %lld-watchos -arch arm64_32 -lSystem -no_pie -o %t %t.arm64_32.o 2>&1 | FileCheck %s +# RUN: %lld -arch x86_64 -no_pie -o %t %t.x86_64.o +# RUN: not %lld -arch arm64 -no_pie -o %t %t.arm64.o 2>&1 | FileCheck %s +# RUN: not %lld -arch arm64e -no_pie -o %t %t.arm64e.o 2>&1 | FileCheck %s +# RUN: not %lld-watchos -arch arm64_32 -no_pie -o %t %t.arm64_32.o 2>&1 | FileCheck %s # CHECK: error: -no_pie ignored for arm64 diff --git a/lld/test/MachO/obj-file-with-stabs.s b/lld/test/MachO/obj-file-with-stabs.s --- a/lld/test/MachO/obj-file-with-stabs.s +++ b/lld/test/MachO/obj-file-with-stabs.s @@ -8,7 +8,7 @@ ## Replace this with "normal" .s test format once lld supports `-r` # RUN: yaml2obj %s -o %t.o -# RUN: %lld -lSystem -arch x86_64 %t.o -o %t +# RUN: %lld -arch x86_64 %t.o -o %t --- !mach-o FileHeader: diff --git a/lld/test/MachO/objc-classrefs-dedup.s b/lld/test/MachO/objc-classrefs-dedup.s --- a/lld/test/MachO/objc-classrefs-dedup.s +++ b/lld/test/MachO/objc-classrefs-dedup.s @@ -3,8 +3,8 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/defs.s -o %t/defs.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/refs1.s -o %t/refs1.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/refs2.s -o %t/refs2.o -# RUN: %lld -lSystem -dylib %t/defs.o -o %t/libdefs.dylib -# RUN: %lld -lSystem -dylib --icf=all %t/refs1.o %t/refs2.o %t/libdefs.dylib -o %t/out +# RUN: %lld -dylib %t/defs.o -o %t/libdefs.dylib +# RUN: %lld -dylib --icf=all %t/refs1.o %t/refs2.o %t/libdefs.dylib -o %t/out # RUN: llvm-objdump --macho --section-headers --bind %t/out | FileCheck %s \ # RUN: --implicit-check-not __objc_classrefs diff --git a/lld/test/MachO/objc-imageinfo.s b/lld/test/MachO/objc-imageinfo.s --- a/lld/test/MachO/objc-imageinfo.s +++ b/lld/test/MachO/objc-imageinfo.s @@ -22,57 +22,57 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/swift-version-2-1.s -o %t/swift-version-2.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/invalid-size-1.s -o %t/invalid-size.o -# RUN: %lld -dylib -lSystem %t/with-category-cls.o -o %t/test-with-cat +# RUN: %lld -dylib %t/with-category-cls.o -o %t/test-with-cat # RUN: llvm-objdump --macho --section="__DATA_CONST,__objc_imageinfo" --syms \ # RUN: %t/test-with-cat | FileCheck %s --check-prefix=HAS-CAT-CLS \ # RUN: --implicit-check-not=_discard_me -# RUN: %lld -dylib -lSystem %t/no-category-cls.o -o %t/test-no-cat +# RUN: %lld -dylib %t/no-category-cls.o -o %t/test-no-cat # RUN: llvm-objdump --macho --section="__DATA_CONST,__objc_imageinfo" --syms \ # RUN: %t/test-no-cat | FileCheck %s --check-prefix=NO-CAT-CLS \ # RUN: --implicit-check-not=_discard_me -# RUN: %lld -dylib -lSystem %t/no-category-cls.o %t/with-category-cls.o -o %t/test1 +# RUN: %lld -dylib %t/no-category-cls.o %t/with-category-cls.o -o %t/test1 # RUN: llvm-objdump --macho --section="__DATA_CONST,__objc_imageinfo" %t/test1 \ # RUN: | FileCheck %s --check-prefix=NO-CAT-CLS -# RUN: %lld -dylib -lSystem %t/with-category-cls.o %t/ignored-flags.o -o %t/test2 +# RUN: %lld -dylib %t/with-category-cls.o %t/ignored-flags.o -o %t/test2 # RUN: llvm-objdump --macho --section="__DATA_CONST,__objc_imageinfo" %t/test2 \ # RUN: | FileCheck %s --check-prefix=HAS-CAT-CLS -# RUN: %lld -dylib -lSystem %t/no-category-cls.o %t/ignored-flags.o -o %t/test3 +# RUN: %lld -dylib %t/no-category-cls.o %t/ignored-flags.o -o %t/test3 # RUN: llvm-objdump --macho --section="__DATA_CONST,__objc_imageinfo" %t/test3 \ # RUN: | FileCheck %s --check-prefix=NO-CAT-CLS -# RUN: %no-fatal-warnings-lld -dylib -lSystem %t/with-category-cls.o \ +# RUN: %no-fatal-warnings-lld -dylib %t/with-category-cls.o \ # RUN: %t/invalid-version.o -o %t/test4 2>&1 | FileCheck %s \ # RUN: --check-prefix=IMAGE-VERSION # RUN: llvm-objdump --macho --section="__DATA_CONST,__objc_imageinfo" %t/test4 \ # RUN: | FileCheck %s --check-prefix=NO-CAT-CLS -# RUN: %no-fatal-warnings-lld -dylib -lSystem %t/no-category-cls.o \ +# RUN: %no-fatal-warnings-lld -dylib %t/no-category-cls.o \ # RUN: %t/invalid-version.o -o %t/test5 2>&1 | FileCheck %s \ # RUN: --check-prefix=IMAGE-VERSION # RUN: llvm-objdump --macho --section="__DATA_CONST,__objc_imageinfo" %t/test5 \ # RUN: | FileCheck %s --check-prefix=NO-CAT-CLS -# RUN: %no-fatal-warnings-lld -dylib -lSystem %t/with-category-cls.o \ +# RUN: %no-fatal-warnings-lld -dylib %t/with-category-cls.o \ # RUN: %t/invalid-size.o -o %t/test6 2>&1 | FileCheck %s \ # RUN: --check-prefix=INVALID-SIZE # RUN: llvm-objdump --macho --section="__DATA_CONST,__objc_imageinfo" %t/test6 \ # RUN: | FileCheck %s --check-prefix=NO-CAT-CLS -# RUN: not %lld -dylib -lSystem %t/swift-version-1.o %t/swift-version-2.o -o \ +# RUN: not %lld -dylib %t/swift-version-1.o %t/swift-version-2.o -o \ # RUN: /dev/null 2>&1 | FileCheck %s --check-prefix=SWIFT-MISMATCH-12 -# RUN: not %lld -dylib -lSystem %t/swift-version-2.o %t/swift-version-1.o -o \ +# RUN: not %lld -dylib %t/swift-version-2.o %t/swift-version-1.o -o \ # RUN: /dev/null 2>&1 | FileCheck %s --check-prefix=SWIFT-MISMATCH-21 ## with-category-cls.o does not have a Swift version (it's set to zero) and ## should be compatible with any Swift version. -# RUN: %lld -dylib -lSystem %t/with-category-cls.o %t/swift-version-1.o -o %t/swift-v1 +# RUN: %lld -dylib %t/with-category-cls.o %t/swift-version-1.o -o %t/swift-v1 # RUN: llvm-objdump --macho --section="__DATA_CONST,__objc_imageinfo" \ # RUN: %t/swift-v1 | FileCheck %s --check-prefix=SWIFT-V1 -# RUN: %lld -dylib -lSystem %t/with-category-cls.o %t/swift-version-2.o -o %t/swift-v2 +# RUN: %lld -dylib %t/with-category-cls.o %t/swift-version-2.o -o %t/swift-v2 # RUN: llvm-objdump --macho --section="__DATA_CONST,__objc_imageinfo" \ # RUN: %t/swift-v2 | FileCheck %s --check-prefix=SWIFT-V2 diff --git a/lld/test/MachO/objc-methname.s b/lld/test/MachO/objc-methname.s --- a/lld/test/MachO/objc-methname.s +++ b/lld/test/MachO/objc-methname.s @@ -4,12 +4,12 @@ # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/strings.s -o %t/strings.o # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/main.s -o %t/main.o -# RUN: %lld -arch arm64 -lSystem -o %t.out %t/strings.o %t/main.o --no-deduplicate-strings +# RUN: %lld -arch arm64 -o %t.out %t/strings.o %t/main.o --no-deduplicate-strings # RUN: llvm-otool -vs __TEXT __cstring %t.out | FileCheck %s --check-prefix=CSTRING # RUN: llvm-otool -vs __TEXT __objc_methname %t.out | FileCheck %s --check-prefix=METHNAME -# RUN: %lld -arch arm64 -lSystem -o %t/duplicates %t/strings.o %t/strings.o %t/main.o +# RUN: %lld -arch arm64 -o %t/duplicates %t/strings.o %t/strings.o %t/main.o # RUN: llvm-otool -vs __TEXT __cstring %t/duplicates | FileCheck %s --check-prefix=CSTRING # RUN: llvm-otool -vs __TEXT __objc_methname %t/duplicates | FileCheck %s --check-prefix=METHNAME diff --git a/lld/test/MachO/objc-selrefs.s b/lld/test/MachO/objc-selrefs.s --- a/lld/test/MachO/objc-selrefs.s +++ b/lld/test/MachO/objc-selrefs.s @@ -5,14 +5,14 @@ # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/explicit-selrefs-2.s -o %t/explicit-selrefs-2.o # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/implicit-selrefs.s -o %t/implicit-selrefs.o -# RUN: %lld -dylib -arch arm64 -lSystem -o %t/explicit-only-no-icf \ +# RUN: %lld -dylib -arch arm64 -o %t/explicit-only-no-icf \ # RUN: %t/explicit-selrefs-1.o %t/explicit-selrefs-2.o # RUN: llvm-otool -vs __DATA __objc_selrefs %t/explicit-only-no-icf | \ # RUN: FileCheck %s --check-prefix=EXPLICIT-NO-ICF ## NOTE: ld64 always dedups the selrefs unconditionally, but we only do it when ## ICF is enabled. -# RUN: %lld -dylib -arch arm64 -lSystem -o %t/explicit-only-with-icf \ +# RUN: %lld -dylib -arch arm64 -o %t/explicit-only-with-icf \ # RUN: %t/explicit-selrefs-1.o %t/explicit-selrefs-2.o # RUN: llvm-otool -vs __DATA __objc_selrefs %t/explicit-only-with-icf \ # RUN: | FileCheck %s --check-prefix=EXPLICIT-WITH-ICF @@ -25,7 +25,7 @@ # SELREFS-EMPTY: ## We don't yet support dedup'ing implicitly-defined selrefs. -# RUN: %lld -dylib -arch arm64 -lSystem --icf=all -o %t/explicit-and-implicit \ +# RUN: %lld -dylib -arch arm64 --icf=all -o %t/explicit-and-implicit \ # RUN: %t/explicit-selrefs-1.o %t/explicit-selrefs-2.o %t/implicit-selrefs.o # RUN: llvm-otool -vs __DATA __objc_selrefs %t/explicit-and-implicit \ # RUN: | FileCheck %s --check-prefix=EXPLICIT-AND-IMPLICIT diff --git a/lld/test/MachO/objc.s b/lld/test/MachO/objc.s --- a/lld/test/MachO/objc.s +++ b/lld/test/MachO/objc.s @@ -14,13 +14,13 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o -# RUN: %lld -lSystem %t/test.o -o %t/test -L%t -lHasSomeObjC -ObjC +# RUN: %lld %t/test.o -o %t/test -L%t -lHasSomeObjC -ObjC # RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=OBJC -# RUN: %lld -lSystem %t/test.o -o %t/test -L%t -lHasSomeObjC2 -ObjC +# RUN: %lld %t/test.o -o %t/test -L%t -lHasSomeObjC2 -ObjC # RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=OBJC -# RUN: %lld -lSystem %t/test.o -o %t/test --start-lib %t/no-objc.o %t/has-objc-symbol.o %t/has-objc-category.o %t/has-swift.o %t/has-swift-proto.o %t/wrong-arch.o --end-lib -ObjC +# RUN: %lld %t/test.o -o %t/test --start-lib %t/no-objc.o %t/has-objc-symbol.o %t/has-objc-category.o %t/has-swift.o %t/has-swift-proto.o %t/wrong-arch.o --end-lib -ObjC # RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=OBJC # OBJC: Sections: @@ -36,7 +36,7 @@ # OBJC-DAG: g F __TEXT,__text _OBJC_CLASS_$_MyObject # OBJC-DAG: g O __TEXT,__swift5_fieldmd $s7somelib4Blah_pMF -# RUN: %lld -lSystem %t/test.o -o %t/test -L%t -lHasSomeObjC +# RUN: %lld %t/test.o -o %t/test -L%t -lHasSomeObjC # RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=NO-OBJC # NO-OBJC: Sections: diff --git a/lld/test/MachO/order-file.s b/lld/test/MachO/order-file.s --- a/lld/test/MachO/order-file.s +++ b/lld/test/MachO/order-file.s @@ -11,99 +11,99 @@ # FOO-SECOND: <_main>: # FOO-SECOND: <_bar>: -# RUN: %lld -lSystem -o %t/test-1 %t/test.o %t/foo.o -order_file %t/ord-1 +# RUN: %lld -o %t/test-1 %t/test.o %t/foo.o -order_file %t/ord-1 # RUN: llvm-objdump -d %t/test-1 | FileCheck %s --check-prefix=FOO-FIRST ## Output should be the same regardless of the command-line order of object files -# RUN: %lld -lSystem -o %t/test-1 %t/foo.o %t/test.o -order_file %t/ord-1 +# RUN: %lld -o %t/test-1 %t/foo.o %t/test.o -order_file %t/ord-1 # RUN: llvm-objdump -d %t/test-1 | FileCheck %s --check-prefix=FOO-FIRST -# RUN: %lld -lSystem -o %t/test-2 %t/test.o %t/foo.o -order_file %t/ord-2 +# RUN: %lld -o %t/test-2 %t/test.o %t/foo.o -order_file %t/ord-2 # RUN: llvm-objdump -d %t/test-2 | FileCheck %s --check-prefix=FOO-SECOND -# RUN: %lld -lSystem -o %t/test-2 %t/foo.o %t/test.o -order_file %t/ord-2 +# RUN: %lld -o %t/test-2 %t/foo.o %t/test.o -order_file %t/ord-2 # RUN: llvm-objdump -d %t/test-2 | FileCheck %s --check-prefix=FOO-SECOND -# RUN: %lld -lSystem -o %t/test-file-match %t/test.o %t/foo.o -order_file %t/ord-file-match +# RUN: %lld -o %t/test-file-match %t/test.o %t/foo.o -order_file %t/ord-file-match # RUN: llvm-objdump -d %t/test-file-match | FileCheck %s --check-prefix=FOO-FIRST ## Output should be the same regardless of the command-line order of object files -# RUN: %lld -lSystem -o %t/test-file-match %t/foo.o %t/test.o -order_file %t/ord-file-match +# RUN: %lld -o %t/test-file-match %t/foo.o %t/test.o -order_file %t/ord-file-match # RUN: llvm-objdump -d %t/test-file-match | FileCheck %s --check-prefix=FOO-FIRST -# RUN: %lld -lSystem -o %t/test-file-nomatch %t/test.o %t/foo.o -order_file %t/ord-file-nomatch +# RUN: %lld -o %t/test-file-nomatch %t/test.o %t/foo.o -order_file %t/ord-file-nomatch # RUN: llvm-objdump -d %t/test-file-nomatch | FileCheck %s --check-prefix=FOO-SECOND -# RUN: %lld -lSystem -o %t/test-file-nomatch %t/foo.o %t/test.o -order_file %t/ord-file-nomatch +# RUN: %lld -o %t/test-file-nomatch %t/foo.o %t/test.o -order_file %t/ord-file-nomatch # RUN: llvm-objdump -d %t/test-file-nomatch | FileCheck %s --check-prefix=FOO-SECOND -# RUN: %lld -lSystem -o %t/test-arch-match %t/test.o %t/foo.o -order_file %t/ord-arch-match +# RUN: %lld -o %t/test-arch-match %t/test.o %t/foo.o -order_file %t/ord-arch-match # RUN: llvm-objdump -d %t/test-arch-match | FileCheck %s --check-prefix=FOO-FIRST -# RUN: %lld -lSystem -o %t/test-arch-match %t/foo.o %t/test.o -order_file %t/ord-arch-match +# RUN: %lld -o %t/test-arch-match %t/foo.o %t/test.o -order_file %t/ord-arch-match # RUN: llvm-objdump -d %t/test-arch-match | FileCheck %s --check-prefix=FOO-FIRST -# RUN: %lld -lSystem -o %t/test-arch-nomatch %t/test.o %t/foo.o -order_file %t/ord-arch-nomatch +# RUN: %lld -o %t/test-arch-nomatch %t/test.o %t/foo.o -order_file %t/ord-arch-nomatch # RUN: llvm-objdump -d %t/test-arch-nomatch | FileCheck %s --check-prefix=FOO-SECOND -# RUN: %lld -lSystem -o %t/test-arch-nomatch %t/foo.o %t/test.o -order_file %t/ord-arch-nomatch +# RUN: %lld -o %t/test-arch-nomatch %t/foo.o %t/test.o -order_file %t/ord-arch-nomatch # RUN: llvm-objdump -d %t/test-arch-nomatch | FileCheck %s --check-prefix=FOO-SECOND -# RUN: %lld -lSystem -o %t/test-arch-match %t/test.o %t/foo.o -order_file %t/ord-arch-match +# RUN: %lld -o %t/test-arch-match %t/test.o %t/foo.o -order_file %t/ord-arch-match # RUN: llvm-objdump -d %t/test-arch-match | FileCheck %s --check-prefix=FOO-FIRST -# RUN: %lld -lSystem -o %t/test-arch-match %t/foo.o %t/test.o -order_file %t/ord-arch-match +# RUN: %lld -o %t/test-arch-match %t/foo.o %t/test.o -order_file %t/ord-arch-match # RUN: llvm-objdump -d %t/test-arch-match | FileCheck %s --check-prefix=FOO-FIRST ## Test archives -# RUN: %lld -lSystem -o %t/test-archive-1 %t/test.o %t/foo.a -order_file %t/ord-1 +# RUN: %lld -o %t/test-archive-1 %t/test.o %t/foo.a -order_file %t/ord-1 # RUN: llvm-objdump -d %t/test-archive-1 | FileCheck %s --check-prefix=FOO-FIRST -# RUN: %lld -lSystem -o %t/test-archive-1 %t/foo.a %t/test.o -order_file %t/ord-1 +# RUN: %lld -o %t/test-archive-1 %t/foo.a %t/test.o -order_file %t/ord-1 # RUN: llvm-objdump -d %t/test-archive-1 | FileCheck %s --check-prefix=FOO-FIRST -# RUN: %lld -lSystem -o %t/test-archive-file-no-match %t/test.o %t/foo.a -order_file %t/ord-file-match +# RUN: %lld -o %t/test-archive-file-no-match %t/test.o %t/foo.a -order_file %t/ord-file-match # RUN: llvm-objdump -d %t/test-archive-file-no-match | FileCheck %s --check-prefix=FOO-SECOND -# RUN: %lld -lSystem -o %t/test-archive %t/foo.a %t/test.o -order_file %t/ord-file-match +# RUN: %lld -o %t/test-archive %t/foo.a %t/test.o -order_file %t/ord-file-match # RUN: llvm-objdump -d %t/test-archive-file-no-match | FileCheck %s --check-prefix=FOO-SECOND -# RUN: %lld -lSystem -o %t/test-archive-1 %t/test.o %t/foo.a -order_file %t/ord-archive-match +# RUN: %lld -o %t/test-archive-1 %t/test.o %t/foo.a -order_file %t/ord-archive-match # RUN: llvm-objdump -d %t/test-archive-1 | FileCheck %s --check-prefix=FOO-FIRST -# RUN: %lld -lSystem -o %t/test-archive-1 %t/foo.a %t/test.o -order_file %t/ord-archive-match +# RUN: %lld -o %t/test-archive-1 %t/foo.a %t/test.o -order_file %t/ord-archive-match # RUN: llvm-objdump -d %t/test-archive-1 | FileCheck %s --check-prefix=FOO-FIRST -# RUN: %lld -lSystem -o %t/test-archive-file-no-match %t/test.o %t/foo.a -order_file %t/ord-file-nomatch +# RUN: %lld -o %t/test-archive-file-no-match %t/test.o %t/foo.a -order_file %t/ord-file-nomatch # RUN: llvm-objdump -d %t/test-archive-file-no-match | FileCheck %s --check-prefix=FOO-SECOND -# RUN: %lld -lSystem -o %t/test-archive %t/foo.a %t/test.o -order_file %t/ord-file-nomatch +# RUN: %lld -o %t/test-archive %t/foo.a %t/test.o -order_file %t/ord-file-nomatch # RUN: llvm-objdump -d %t/test-archive-file-no-match | FileCheck %s --check-prefix=FOO-SECOND ## The following tests check that if an address is matched by multiple order ## file entries, it should always use the lowest-ordered match. -# RUN: %lld -lSystem -o %t/test-1 %t/test.o %t/foo.o -order_file %t/ord-multiple-1 +# RUN: %lld -o %t/test-1 %t/test.o %t/foo.o -order_file %t/ord-multiple-1 # RUN: llvm-objdump -d %t/test-1 | FileCheck %s --check-prefix=FOO-FIRST -# RUN: %lld -lSystem -o %t/test-1 %t/foo.o %t/test.o -order_file %t/ord-multiple-1 +# RUN: %lld -o %t/test-1 %t/foo.o %t/test.o -order_file %t/ord-multiple-1 # RUN: llvm-objdump -d %t/test-1 | FileCheck %s --check-prefix=FOO-FIRST -# RUN: %lld -lSystem -o %t/test-2 %t/test.o %t/foo.o -order_file %t/ord-multiple-2 +# RUN: %lld -o %t/test-2 %t/test.o %t/foo.o -order_file %t/ord-multiple-2 # RUN: llvm-objdump -d %t/test-2 | FileCheck %s --check-prefix=FOO-FIRST -# RUN: %lld -lSystem -o %t/test-2 %t/foo.o %t/test.o -order_file %t/ord-multiple-2 +# RUN: %lld -o %t/test-2 %t/foo.o %t/test.o -order_file %t/ord-multiple-2 # RUN: llvm-objdump -d %t/test-2 | FileCheck %s --check-prefix=FOO-FIRST -# RUN: %lld -lSystem -o %t/test-3 %t/test.o %t/foo.o -order_file %t/ord-multiple-3 +# RUN: %lld -o %t/test-3 %t/test.o %t/foo.o -order_file %t/ord-multiple-3 # RUN: llvm-objdump -d %t/test-3 | FileCheck %s --check-prefix=FOO-FIRST -# RUN: %lld -lSystem -o %t/test-3 %t/foo.o %t/test.o -order_file %t/ord-multiple-3 +# RUN: %lld -o %t/test-3 %t/foo.o %t/test.o -order_file %t/ord-multiple-3 # RUN: llvm-objdump -d %t/test-3 | FileCheck %s --check-prefix=FOO-FIRST -# RUN: %lld -lSystem -o %t/test-4 %t/test.o %t/foo.o -order_file %t/ord-multiple-4 +# RUN: %lld -o %t/test-4 %t/test.o %t/foo.o -order_file %t/ord-multiple-4 # RUN: llvm-objdump -d %t/test-4 | FileCheck %s --check-prefix=FOO-FIRST -# RUN: %lld -lSystem -o %t/test-4 %t/foo.o %t/test.o -order_file %t/ord-multiple-4 +# RUN: %lld -o %t/test-4 %t/foo.o %t/test.o -order_file %t/ord-multiple-4 # RUN: llvm-objdump -d %t/test-4 | FileCheck %s --check-prefix=FOO-FIRST ## -[Foo doFoo:andBar:] and _bar both point to the same location. When both ## symbols appear in an order file, the location in question should be ordered ## according to the lowest-ordered symbol that references it. -# RUN: %lld -lSystem -o %t/test-alias %t/test.o %t/foo.o -order_file %t/ord-alias +# RUN: %lld -o %t/test-alias %t/test.o %t/foo.o -order_file %t/ord-alias # RUN: llvm-objdump -d %t/test-alias | FileCheck %s --check-prefix=FOO-FIRST -# RUN: %lld -lSystem -o %t/test-alias %t/foo.o %t/test.o -order_file %t/ord-alias +# RUN: %lld -o %t/test-alias %t/foo.o %t/test.o -order_file %t/ord-alias # RUN: llvm-objdump -d %t/test-alias | FileCheck %s --check-prefix=FOO-FIRST ## Absolute in symbols in order files make no sense. Just ignore them. -# RUN: %lld -lSystem -dylib -o %t/test-abs %t/abs.o -order_file %t/ord-abs +# RUN: %lld -dylib -o %t/test-abs %t/abs.o -order_file %t/ord-abs #--- ord-1 -[Foo doFoo:andBar:] # just a comment diff --git a/lld/test/MachO/pagezero.s b/lld/test/MachO/pagezero.s --- a/lld/test/MachO/pagezero.s +++ b/lld/test/MachO/pagezero.s @@ -3,22 +3,22 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/x86_64.o # RUN: llvm-mc -filetype=obj -triple=arm64_32-apple-darwin %s -o %t/arm64_32.o -# RUN: %lld -lSystem -arch x86_64 -o %t/x86_64 %t/x86_64.o -pagezero_size 100000 +# RUN: %lld -arch x86_64 -o %t/x86_64 %t/x86_64.o -pagezero_size 100000 # RUN: llvm-readobj --macho-segment %t/x86_64 | FileCheck %s -D#VMSIZE=0x100000 -D#SIZE=72 -# RUN: %lld-watchos -lSystem -arch arm64_32 -o %t/arm64_32 %t/arm64_32.o -pagezero_size 100000 +# RUN: %lld-watchos -arch arm64_32 -o %t/arm64_32 %t/arm64_32.o -pagezero_size 100000 # RUN: llvm-readobj --macho-segment %t/arm64_32 | FileCheck %s -D#VMSIZE=0x100000 -D#SIZE=56 -# RUN: %lld -lSystem -arch x86_64 -o %t/zero %t/x86_64.o -pagezero_size 0 +# RUN: %lld -arch x86_64 -o %t/zero %t/x86_64.o -pagezero_size 0 # RUN: llvm-readobj --macho-segment %t/zero | FileCheck %s --check-prefix=CHECK-ZERO -D#VMSIZE=0x1000 -D#SIZE=152 -# RUN: %no-fatal-warnings-lld -lSystem -arch x86_64 -o %t/x86_64-misalign %t/x86_64.o -pagezero_size 1001 2>&1 | FileCheck %s --check-prefix=LINK -D#SIZE=0x1000 +# RUN: %no-fatal-warnings-lld -arch x86_64 -o %t/x86_64-misalign %t/x86_64.o -pagezero_size 1001 2>&1 | FileCheck %s --check-prefix=LINK -D#SIZE=0x1000 # RUN: llvm-readobj --macho-segment %t/x86_64-misalign | FileCheck %s -D#VMSIZE=0x1000 -D#SIZE=72 -# RUN: %no-fatal-warnings-lld-watchos -lSystem -arch arm64_32 -o %t/arm64_32-misalign-4K %t/arm64_32.o -pagezero_size 1001 2>&1 | FileCheck %s --check-prefix=LINK -D#SIZE=0x0 +# RUN: %no-fatal-warnings-lld-watchos -arch arm64_32 -o %t/arm64_32-misalign-4K %t/arm64_32.o -pagezero_size 1001 2>&1 | FileCheck %s --check-prefix=LINK -D#SIZE=0x0 # RUN: llvm-readobj --macho-segment %t/arm64_32-misalign-4K | FileCheck %s --check-prefix=CHECK-ZERO -D#VMSIZE=0x4000 -D#SIZE=124 -# RUN: %no-fatal-warnings-lld-watchos -lSystem -arch arm64_32 -o %t/arm64_32-misalign-16K %t/arm64_32.o -pagezero_size 4001 2>&1 | FileCheck %s --check-prefix=LINK -D#SIZE=0x4000 +# RUN: %no-fatal-warnings-lld-watchos -arch arm64_32 -o %t/arm64_32-misalign-16K %t/arm64_32.o -pagezero_size 4001 2>&1 | FileCheck %s --check-prefix=LINK -D#SIZE=0x4000 # RUN: llvm-readobj --macho-segment %t/arm64_32-misalign-16K | FileCheck %s -D#VMSIZE=0x4000 -D#SIZE=56 # LINK: warning: __PAGEZERO size is not page aligned, rounding down to 0x[[#%x,SIZE]] diff --git a/lld/test/MachO/reexport-stub.s b/lld/test/MachO/reexport-stub.s --- a/lld/test/MachO/reexport-stub.s +++ b/lld/test/MachO/reexport-stub.s @@ -12,7 +12,7 @@ # DYLIB-HEADERS: name /usr/lib/libc++.dylib # RUN: llvm-mc -filetype obj -triple x86_64-apple-darwin %s -o %t/test.o -# RUN: %lld -o %t/test -lSystem -L%t -lreexporter %t/test.o +# RUN: %lld -o %t/test -L%t -lreexporter %t/test.o # RUN: llvm-objdump --bind --no-show-raw-insn -d %t/test | FileCheck %s # CHECK: Bind table: diff --git a/lld/test/MachO/referenced-dynamically.s b/lld/test/MachO/referenced-dynamically.s --- a/lld/test/MachO/referenced-dynamically.s +++ b/lld/test/MachO/referenced-dynamically.s @@ -1,7 +1,7 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o -# RUN: %lld %t.o -lSystem -o %t.out +# RUN: %lld %t.o -o %t.out # RUN: llvm-readobj --syms %t.out | FileCheck %s ## ld64 has a "TEMP work around until goes in" diff --git a/lld/test/MachO/reloc-subtractor.s b/lld/test/MachO/reloc-subtractor.s --- a/lld/test/MachO/reloc-subtractor.s +++ b/lld/test/MachO/reloc-subtractor.s @@ -2,9 +2,9 @@ # RUN: rm -rf %t; split-file %s %t # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/x86_64.o # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/test.s -o %t/arm64.o -# RUN: %lld -lSystem %t/x86_64.o -o %t/x86_64 -order_file %t/order-file +# RUN: %lld %t/x86_64.o -o %t/x86_64 -order_file %t/order-file # RUN: llvm-objdump --syms --full-contents --rebase %t/x86_64 | FileCheck %s -# RUN: %lld -arch arm64 -lSystem %t/arm64.o -o %t/arm64 -order_file %t/order-file +# RUN: %lld -arch arm64 %t/arm64.o -o %t/arm64 -order_file %t/order-file # RUN: llvm-objdump --syms --full-contents --rebase %t/arm64 | FileCheck %s # CHECK-LABEL: SYMBOL TABLE: diff --git a/lld/test/MachO/rename.s b/lld/test/MachO/rename.s --- a/lld/test/MachO/rename.s +++ b/lld/test/MachO/rename.s @@ -29,7 +29,7 @@ # BAD2-DAG: error: {{.*}}: unhandled file type ## Check that section and segment renames happen. -# RUN: %lld -lSystem \ +# RUN: %lld \ # RUN: -rename_section __FROM_SECT __from_sect __TO_SECT __to_sect \ # RUN: -rename_segment __FROM_SEG __TO_SEG \ # RUN: -rename_section __TEXT __cstring __RODATA __cstring \ diff --git a/lld/test/MachO/reroot-path.s b/lld/test/MachO/reroot-path.s --- a/lld/test/MachO/reroot-path.s +++ b/lld/test/MachO/reroot-path.s @@ -23,29 +23,29 @@ # RUN: %lld -dylib %t/bar.o -o %t/%:t/libbar.dylib ## Test our various file-loading flags to make sure all bases are covered. -# RUN: %lld --reproduce %t/repro1.tar -lSystem -syslibroot %t %t/foo.a %t/bar.a %t/test.o -o /dev/null -t | FileCheck %s -DDIR="%t/%:t" +# RUN: %lld --reproduce %t/repro1.tar -syslibroot %t %t/foo.a %t/bar.a %t/test.o -o /dev/null -t | FileCheck %s -DDIR="%t/%:t" # RUN: tar xf %t/repro1.tar -C %t # RUN: cd %t/repro1; %no-arg-lld @response.txt | FileCheck %s -DDIR="%:t/%:t" -# RUN: %lld --reproduce %t/repro2.tar -lSystem -syslibroot %t -force_load %t/foo.a -force_load %t/bar.a %t/test.o -o /dev/null -t | FileCheck %s -DDIR="%t/%:t" +# RUN: %lld --reproduce %t/repro2.tar -syslibroot %t -force_load %t/foo.a -force_load %t/bar.a %t/test.o -o /dev/null -t | FileCheck %s -DDIR="%t/%:t" # RUN: tar xf %t/repro2.tar -C %t # RUN: cd %t/repro2; %no-arg-lld @response.txt | FileCheck %s -DDIR="%:t/%:t" -# RUN: %lld --reproduce %t/repro3.tar -lSystem -syslibroot %t %t/libfoo.dylib %t/libbar.dylib %t/test.o -o /dev/null -t | FileCheck %s -DDIR="%t/%:t" +# RUN: %lld --reproduce %t/repro3.tar -syslibroot %t %t/libfoo.dylib %t/libbar.dylib %t/test.o -o /dev/null -t | FileCheck %s -DDIR="%t/%:t" # RUN: tar xf %t/repro3.tar -C %t # RUN: cd %t/repro3; %no-arg-lld @response.txt | FileCheck %s -DDIR="%:t/%:t" -# RUN: %lld --reproduce %t/repro4.tar -lSystem -syslibroot %t -weak_library %t/libfoo.dylib -weak_library %t/libbar.dylib %t/test.o -o /dev/null -t | FileCheck %s -DDIR="%t/%:t" +# RUN: %lld --reproduce %t/repro4.tar -syslibroot %t -weak_library %t/libfoo.dylib -weak_library %t/libbar.dylib %t/test.o -o /dev/null -t | FileCheck %s -DDIR="%t/%:t" # RUN: tar xf %t/repro4.tar -C %t # RUN: cd %t/repro4; %no-arg-lld @response.txt | FileCheck %s -DDIR="%:t/%:t" -# RUN: %lld --reproduce %t/repro7.tar -lSystem -syslibroot %t -force_load %t/foo.a -force_load %t/bar.a %t/test.o -o /dev/null -t | FileCheck %s -DDIR="%t/%:t" +# RUN: %lld --reproduce %t/repro7.tar -syslibroot %t -force_load %t/foo.a -force_load %t/bar.a %t/test.o -o /dev/null -t | FileCheck %s -DDIR="%t/%:t" # RUN: tar xf %t/repro7.tar -C %t # RUN: cd %t/repro7; %no-arg-lld @response.txt | FileCheck %s -DDIR="%:t/%:t" # RUN: echo "%t/libfoo.dylib" > %t/filelist # RUN: echo "%t/libbar.dylib" >> %t/filelist -# RUN: %lld --reproduce %t/repro5.tar -lSystem -syslibroot %t -filelist %t/filelist %t/test.o -o /dev/null -t | FileCheck %s -DDIR="%t/%:t" +# RUN: %lld --reproduce %t/repro5.tar -syslibroot %t -filelist %t/filelist %t/test.o -o /dev/null -t | FileCheck %s -DDIR="%t/%:t" # RUN: tar xf %t/repro5.tar -C %t # RUN: cd %t/repro5; %no-arg-lld @response.txt | FileCheck %s -DDIR="%:t/%:t" @@ -54,7 +54,7 @@ ## Paths to object files don't get rerooted. # RUN: mv %t/bar.o %t/%:t/bar.o -# RUN: not %lld -lSystem -syslibroot %t %t/foo.o %t/bar.o %t/test.o -o \ +# RUN: not %lld -syslibroot %t %t/foo.o %t/bar.o %t/test.o -o \ # RUN: /dev/null 2>&1 | FileCheck %s --check-prefix=OBJ # OBJ: error: cannot open {{.*[\\/]}}bar.o: {{[Nn]}}o such file or directory @@ -62,7 +62,7 @@ ## rerooted path takes precedence over the original path. We will get an ## undefined symbol error since we aren't loading %t/libfoo.dylib. # RUN: cp %t/%:t/libbar.dylib %t/%:t/libfoo.dylib -# RUN: not %lld --reproduce %t/repro6.tar -lSystem -syslibroot %t %t/libfoo.dylib %t/libbar.dylib %t/test.o \ +# RUN: not %lld --reproduce %t/repro6.tar -syslibroot %t %t/libfoo.dylib %t/libbar.dylib %t/test.o \ # RUN: -o /dev/null -t 2> %t/error | FileCheck %s -DDIR="%t/%:t" --check-prefix=FOO # RUN: FileCheck %s --check-prefix=UNDEF < %t/error diff --git a/lld/test/MachO/stabs-dwarf5.s b/lld/test/MachO/stabs-dwarf5.s --- a/lld/test/MachO/stabs-dwarf5.s +++ b/lld/test/MachO/stabs-dwarf5.s @@ -1,7 +1,7 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin -dwarf-version=5 %s -o %t.o -# RUN: %lld -lSystem %t.o -o %t +# RUN: %lld %t.o -o %t # RUN: dsymutil -s %t | FileCheck %s -DDIR=%t -DSRC_PATH=%t.o # CHECK: (N_SO ) 00 0000 0000000000000000 '/tmp{{[/\\]}}test.cpp' diff --git a/lld/test/MachO/stabs-icf.s b/lld/test/MachO/stabs-icf.s --- a/lld/test/MachO/stabs-icf.s +++ b/lld/test/MachO/stabs-icf.s @@ -1,7 +1,7 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o -# RUN: %lld -lSystem --icf=all %t.o -o %t +# RUN: %lld --icf=all %t.o -o %t # RUN: dsymutil -s %t | FileCheck %s -DDIR=%t -DSRC_PATH=%t.o ## This should include no N_FUN entry for _baz (which is ICF'd into _bar), diff --git a/lld/test/MachO/stabs.s b/lld/test/MachO/stabs.s --- a/lld/test/MachO/stabs.s +++ b/lld/test/MachO/stabs.s @@ -9,35 +9,35 @@ # RUN: env TZ=UTC touch -t "197001010000.32" %t/foo.o # RUN: llvm-ar rcsU %t/foo.a %t/foo.o -# RUN: ZERO_AR_DATE=0 %lld -lSystem %t/test.o %t/foo.o %t/no-debug.o -o %t/test +# RUN: ZERO_AR_DATE=0 %lld %t/test.o %t/foo.o %t/no-debug.o -o %t/test # RUN: (llvm-objdump --section-headers %t/test; dsymutil -s %t/test) | \ # RUN: FileCheck %s -DDIR=%t -DFOO_PATH=%t/foo.o \ # RUN: -D#TEST_TIME=0x10 -D#FOO_TIME=0x20 ## Check that we emit the right modtime even when the object file is in an ## archive. -# RUN: ZERO_AR_DATE=0 %lld -lSystem %t/test.o %t/foo.a %t/no-debug.o -o %t/test +# RUN: ZERO_AR_DATE=0 %lld %t/test.o %t/foo.a %t/no-debug.o -o %t/test # RUN: (llvm-objdump --section-headers %t/test; dsymutil -s %t/test) | \ # RUN: FileCheck %s -DDIR=%t -DFOO_PATH=%t/foo.a\(foo.o\) \ # RUN: -D#TEST_TIME=0x10 -D#FOO_TIME=0x20 ## Check that we don't emit modtimes if ZERO_AR_DATE is set. -# RUN: env ZERO_AR_DATE=1 %lld -lSystem %t/test.o %t/foo.o %t/no-debug.o \ +# RUN: env ZERO_AR_DATE=1 %lld %t/test.o %t/foo.o %t/no-debug.o \ # RUN: -o %t/test # RUN: (llvm-objdump --section-headers %t/test; dsymutil -s %t/test) | \ # RUN: FileCheck %s -DDIR=%t -DFOO_PATH=%t/foo.o \ # RUN: -D#TEST_TIME=0 -D#FOO_TIME=0 -# RUN: env %lld -lSystem %t/test.o %t/foo.a %t/no-debug.o \ +# RUN: env %lld %t/test.o %t/foo.a %t/no-debug.o \ # RUN: -o %t/test # RUN: (llvm-objdump --section-headers %t/test; dsymutil -s %t/test) | \ # RUN: FileCheck %s -DDIR=%t -DFOO_PATH=%t/foo.a\(foo.o\) \ # RUN: -D#TEST_TIME=0 -D#FOO_TIME=0 -# RUN: env %lld -lSystem %t/test.o %t/no-debug.o \ +# RUN: env %lld %t/test.o %t/no-debug.o \ # RUN: -all_load %t/foo.a -o %t/test # RUN: (llvm-objdump --section-headers %t/test; dsymutil -s %t/test) | \ # RUN: FileCheck %s -DDIR=%t -DFOO_PATH=%t/foo.a\(foo.o\) \ # RUN: -D#TEST_TIME=0 -D#FOO_TIME=0 -# RUN: env %lld -lSystem %t/test.o %t/no-debug.o \ +# RUN: env %lld %t/test.o %t/no-debug.o \ # RUN: -force_load %t/foo.a -o %t/test # RUN: (llvm-objdump --section-headers %t/test; dsymutil -s %t/test) | \ # RUN: FileCheck %s -DDIR=%t -DFOO_PATH=%t/foo.a\(foo.o\) \ @@ -45,30 +45,30 @@ ## Check that we emit absolute paths to the object files in our OSO entries ## even if our inputs are relative paths. -# RUN: cd %t && ZERO_AR_DATE=0 %lld -lSystem test.o foo.o no-debug.o -o test +# RUN: cd %t && ZERO_AR_DATE=0 %lld test.o foo.o no-debug.o -o test # RUN: (llvm-objdump --section-headers %t/test; dsymutil -s %t/test) | \ # RUN: FileCheck %s -DDIR=%t -DFOO_PATH=%t/foo.o \ # RUN: -D#TEST_TIME=0x10 -D#FOO_TIME=0x20 ## Check that we emit relative path to object files in OSO entries ## when -oso_prefix is used. -# RUN: cd %t && ZERO_AR_DATE=0 %lld -lSystem test.o foo.o no-debug.o -oso_prefix "%t" -o %t/test-rel +# RUN: cd %t && ZERO_AR_DATE=0 %lld test.o foo.o no-debug.o -oso_prefix "%t" -o %t/test-rel # RUN: dsymutil -s %t/test-rel | grep 'N_OSO' | FileCheck %s -D#TEST_TIME=0x10 -D#FOO_TIME=0x20 --check-prefix=REL-PATH -# RUN: cd %t && ZERO_AR_DATE=0 %lld -lSystem test.o foo.o no-debug.o -oso_prefix "%t/" -o %t/test-rel +# RUN: cd %t && ZERO_AR_DATE=0 %lld test.o foo.o no-debug.o -oso_prefix "%t/" -o %t/test-rel # RUN: dsymutil -s %t/test-rel | grep 'N_OSO' | FileCheck %s -D#TEST_TIME=0x10 -D#FOO_TIME=0x20 --check-prefix=REL-PATH-NO-SLASH -# RUN: cd %t && ZERO_AR_DATE=0 %lld -lSystem test.o foo.o no-debug.o -oso_prefix "." -o %t/test-rel-dot +# RUN: cd %t && ZERO_AR_DATE=0 %lld test.o foo.o no-debug.o -oso_prefix "." -o %t/test-rel-dot # RUN: dsymutil -s %t/test-rel-dot | grep 'N_OSO' | FileCheck %s -D#TEST_TIME=0x10 -D#FOO_TIME=0x20 --check-prefix=REL-DOT ## Set HOME to %t (for ~ to expand to) -# RUN: cd %t && env HOME=%t ZERO_AR_DATE=0 %lld -lSystem test.o foo.o no-debug.o -oso_prefix "~" -o %t/test-rel-tilde +# RUN: cd %t && env HOME=%t ZERO_AR_DATE=0 %lld test.o foo.o no-debug.o -oso_prefix "~" -o %t/test-rel-tilde # RUN: dsymutil -s %t/test-rel-tilde | grep 'N_OSO' | FileCheck %s -D#TEST_TIME=0x10 -D#FOO_TIME=0x20 --check-prefix=REL-PATH ## Check that we don't emit DWARF or stabs when -S is used -# RUN: %lld -lSystem test.o foo.o no-debug.o -S -o %t/test-no-debug +# RUN: %lld test.o foo.o no-debug.o -S -o %t/test-no-debug ## grep returns an exit code of 1 if it cannot match the intended pattern. We ## expect to not find any entries which requires the exit code to be negated. # RUN: llvm-nm -ap %t/test-no-debug | not grep -e ' - ' -# RUN: cd %t && ZERO_AR_DATE=0 %lld -lSystem test.o foo.a no-debug.o -o %t/test +# RUN: cd %t && ZERO_AR_DATE=0 %lld test.o foo.a no-debug.o -o %t/test # RUN: (llvm-objdump --section-headers %t/test; dsymutil -s %t/test) | \ # RUN: FileCheck %s -DDIR=%t -DFOO_PATH=%t/foo.a\(foo.o\) \ # RUN: -D#TEST_TIME=0x10 -D#FOO_TIME=0x20 @@ -134,7 +134,7 @@ ## Check that we don't attempt to emit rebase opcodes for the debug sections ## when building a PIE (since we have filtered the sections out). -# RUN: %lld -lSystem %t/test.o %t/foo.a %t/no-debug.o -o %t/test +# RUN: %lld %t/test.o %t/foo.a %t/no-debug.o -o %t/test # RUN: llvm-objdump --macho --rebase %t/test | FileCheck %s --check-prefix=PIE # PIE: Rebase table: # PIE-NEXT: segment section address type diff --git a/lld/test/MachO/start-end.s b/lld/test/MachO/start-end.s --- a/lld/test/MachO/start-end.s +++ b/lld/test/MachO/start-end.s @@ -6,7 +6,7 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/foo.s -o %t/foo.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/seg.s -o %t/seg.o -# RUN: %lld -lSystem %t/main.o %t/foo.o -o %t.out \ +# RUN: %lld %t/main.o %t/foo.o -o %t.out \ # RUN: -rename_section __FOO __bar __BAZ __quux \ # RUN: -rename_section __WHAT __ever __FOO __bar \ # RUN: -u 'section$start$__UFLAG_SEG$__uflag_sect' \ @@ -29,7 +29,7 @@ ## Nothing should change if we reorder two functions in the text segment. ## (Reorder some section$start/end symbols too for good measure.) -# RUN: %lld -lSystem %t/main.o %t/foo.o -o %t.ordered.out \ +# RUN: %lld %t/main.o %t/foo.o -o %t.ordered.out \ # RUN: -order_file %t/order.txt \ # RUN: -rename_section __FOO __bar __BAZ __quux \ # RUN: -rename_section __WHAT __ever __FOO __bar \ @@ -43,7 +43,7 @@ # RUN: FileCheck %s < %t-ordered-dump.txt ## `-undefined dynamic_lookup` also shouldn't change anything. -# RUN: %lld -lSystem %t/main.o %t/foo.o -o %t.dl.out -undefined dynamic_lookup \ +# RUN: %lld %t/main.o %t/foo.o -o %t.dl.out -undefined dynamic_lookup \ # RUN: -rename_section __FOO __bar __BAZ __quux \ # RUN: -rename_section __WHAT __ever __FOO __bar \ # RUN: -u 'section$start$__UFLAG_SEG$__uflag_sect' \ @@ -66,13 +66,13 @@ ## Test that the link succeeds with dead-stripping enabled too. -# RUN: %lld -dead_strip -lSystem %t/main.o -o %t/stripped.out +# RUN: %lld -dead_strip %t/main.o -o %t/stripped.out # RUN: llvm-objdump --macho --syms --section-headers %t/stripped.out > %t-stripped-dump.txt # RUN: llvm-objdump --no-print-imm-hex --macho -d --no-symbolic-operands --no-show-raw-insn %t/stripped.out >> %t-stripped-dump.txt # RUN: FileCheck --check-prefix=STRIP %s < %t-stripped-dump.txt ## -u 'section$start$*' does not cause an undefined symbol error. This matches ld64. -# RUN: %lld -dead_strip -lSystem %t/main.o -u 'section$start$__FOO$__notexist' -o %t/stripped1.out +# RUN: %lld -dead_strip %t/main.o -u 'section$start$__FOO$__notexist' -o %t/stripped1.out # RUN: llvm-objdump --section-headers %t/stripped1.out | FileCheck --check-prefix=STRIP2 %s ## (Fun fact: `-e 'section$start$__TEXT$__text -dead_strip` strips @@ -216,7 +216,7 @@ ############################################################################### ## Test segment$start and segment$end. -# RUN: %lld -lSystem %t/seg.o -o %t.seg.out \ +# RUN: %lld %t/seg.o -o %t.seg.out \ # RUN: -rename_segment __FOO __BAZ \ # RUN: -rename_segment __WHAT __FOO \ # RUN: -u 'segment$start$__UFLAG_SEG' \ diff --git a/lld/test/MachO/sub-library.s b/lld/test/MachO/sub-library.s --- a/lld/test/MachO/sub-library.s +++ b/lld/test/MachO/sub-library.s @@ -95,12 +95,12 @@ # RUN: -o %t/Hello2.framework/Hello2 # RUN: %lld -dylib -o %t/libgoodbye4.dylib %t/libgoodbye.o \ # RUN: -reexport_library %t/Hello2.framework/Hello2 -# RUN: not %lld -lSystem -o %t/hello %t/libgoodbye4.dylib %t/sub-library.o 2>&1 \ +# RUN: not %lld -o %t/hello %t/libgoodbye4.dylib %t/sub-library.o 2>&1 \ # RUN: | FileCheck %s --check-prefix=NOTFOUND -# RUN: not %lld -lSystem -o %t/hello -L%t %t/libgoodbye4.dylib %t/sub-library.o 2>&1 \ +# RUN: not %lld -o %t/hello -L%t %t/libgoodbye4.dylib %t/sub-library.o 2>&1 \ # RUN: | FileCheck %s --check-prefix=NOTFOUND # NOTFOUND: unable to locate re-export with install name /path/to/Hello2.framework/Hello2 -# RUN: %lld -lSystem -o %t/hello -F%t %t/libgoodbye4.dylib %t/sub-library.o +# RUN: %lld -o %t/hello -F%t %t/libgoodbye4.dylib %t/sub-library.o ## Check that -L (but not -F) can override the search path in install_name for ## libraries. @@ -109,12 +109,12 @@ # RUN: -o %t/libhello2.dylib # RUN: %lld -dylib -o %t/libgoodbye5.dylib %t/libgoodbye.o \ # RUN: -reexport_library %t/libhello2.dylib -# RUN: not %lld -lSystem -o %t/hello %t/libgoodbye5.dylib %t/sub-library.o 2>&1 \ +# RUN: not %lld -o %t/hello %t/libgoodbye5.dylib %t/sub-library.o 2>&1 \ # RUN: | FileCheck %s --check-prefix=NOTFOUND2 -# RUN: not %lld -lSystem -o %t/hello -F%t %t/libgoodbye5.dylib %t/sub-library.o 2>&1 \ +# RUN: not %lld -o %t/hello -F%t %t/libgoodbye5.dylib %t/sub-library.o 2>&1 \ # RUN: | FileCheck %s --check-prefix=NOTFOUND2 # NOTFOUND2: unable to locate re-export with install name /path/to/libhello2.dylib -# RUN: %lld -lSystem -o %t/hello -L%t %t/libgoodbye5.dylib %t/sub-library.o +# RUN: %lld -o %t/hello -L%t %t/libgoodbye5.dylib %t/sub-library.o .text .globl _main diff --git a/lld/test/MachO/symtab.s b/lld/test/MachO/symtab.s --- a/lld/test/MachO/symtab.s +++ b/lld/test/MachO/symtab.s @@ -4,7 +4,7 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test2.s -o %t/test2.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/libfoo.s -o %t/libfoo.o # RUN: %lld -dylib %t/libfoo.o -o %t/libfoo.dylib -# RUN: %lld -lSystem %t/test.o %t/test2.o %t/libfoo.dylib -o %t/test +# RUN: %lld %t/test.o %t/test2.o %t/libfoo.dylib -o %t/test # RUN: llvm-readobj --syms --sort-symbols=type,name --macho-dysymtab %t/test | FileCheck %s # CHECK: Symbols [ diff --git a/lld/test/MachO/t.s b/lld/test/MachO/t.s --- a/lld/test/MachO/t.s +++ b/lld/test/MachO/t.s @@ -11,7 +11,7 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/main.o %t/main.s -# RUN: %lld %t/main.o %t/baz.o %t/bar.a %t/libfoo.dylib -lSystem -o /dev/null -t | FileCheck -DPATH='%t' %s +# RUN: %lld %t/main.o %t/baz.o %t/bar.a %t/libfoo.dylib -o /dev/null -t | FileCheck -DPATH='%t' %s # CHECK-DAG: bar.a(bar.o) # CHECK-DAG: [[PATH]]/main.o diff --git a/lld/test/MachO/tapi-link-by-arch.s b/lld/test/MachO/tapi-link-by-arch.s --- a/lld/test/MachO/tapi-link-by-arch.s +++ b/lld/test/MachO/tapi-link-by-arch.s @@ -3,11 +3,11 @@ # RUN: mkdir -p %t # RUN: llvm-mc -filetype obj -triple arm64-apple-ios14.4 %s -o %t/arm64-ios.o # RUN: not %no-arg-lld -dylib -arch arm64 -platform_version ios 14.4 15.0 -o /dev/null \ -# RUN: -lSystem %S/Inputs/libStubLink.tbd %t/arm64-ios.o 2>&1 | FileCheck %s +# RUN: %S/Inputs/libStubLink.tbd %t/arm64-ios.o 2>&1 | FileCheck %s # RUN: llvm-mc -filetype obj -triple x86_64-apple-iossimulator14.4 %s -o %t/x86_64-sim.o # RUN: not %no-arg-lld -dylib -arch x86_64 -platform_version ios-simulator 14.4 15.0 -o /dev/null \ -# RUN: -lSystem %S/Inputs/libStubLink.tbd %t/x86_64-sim.o 2>&1 | FileCheck %s +# RUN: %S/Inputs/libStubLink.tbd %t/x86_64-sim.o 2>&1 | FileCheck %s # RUN: llvm-mc -filetype obj -triple arm64-apple-iossimulator14.4 %s -o %t/arm64-sim.o # RUN: %no-arg-lld -dylib -arch arm64 -platform_version ios-simulator 14.4 15.0 -o \ diff --git a/lld/test/MachO/tapi-link.s b/lld/test/MachO/tapi-link.s --- a/lld/test/MachO/tapi-link.s +++ b/lld/test/MachO/tapi-link.s @@ -4,15 +4,15 @@ # RUN: llvm-mc -filetype obj -triple x86_64-apple-darwin %t/test.s -o %t/test.o -# RUN: %lld -o %t/test -lSystem -lc++ -framework CoreFoundation %t/libNested.tbd %t/libTlvWeak.tbd %t/test.o +# RUN: %lld -o %t/test -lc++ -framework CoreFoundation %t/libNested.tbd %t/libTlvWeak.tbd %t/test.o # RUN: llvm-objdump --bind --weak-bind --no-show-raw-insn -d -r %t/test | FileCheck %s ## Targeting an arch not listed in the tbd should fallback to an ABI compatible arch -# RUN: %lld -arch x86_64h -o %t/test-compat -lSystem -lc++ -framework CoreFoundation %t/libNested.tbd %t/libTlvWeak.tbd %t/test.o +# RUN: %lld -arch x86_64h -o %t/test-compat -lc++ -framework CoreFoundation %t/libNested.tbd %t/libTlvWeak.tbd %t/test.o # RUN: llvm-objdump --bind --weak-bind --no-show-raw-insn -d -r %t/test-compat | FileCheck %s ## Setting LD_DYLIB_CPU_SUBTYPES_MUST_MATCH forces exact target arch match. -# RUN: env LD_DYLIB_CPU_SUBTYPES_MUST_MATCH=1 not %lld -arch x86_64h -o /dev/null -lSystem -lc++ -framework \ +# RUN: env LD_DYLIB_CPU_SUBTYPES_MUST_MATCH=1 not %lld -arch x86_64h -o /dev/null -lc++ -framework \ # RUN: CoreFoundation %t/libNested.tbd %t/libTlvWeak.tbd %t/test.o 2>&1 | FileCheck %s -check-prefix=INCOMPATIBLE # INCOMPATIBLE: error: {{.*}}libSystem.tbd(/usr/lib/libSystem.dylib) is incompatible with x86_64h (macOS) @@ -22,7 +22,7 @@ ## libReexportSystem.tbd tests that we can reference symbols from a 2nd-level ## tapi document, re-exported by a top-level tapi document, which itself is ## re-exported by another top-level tapi document. -# RUN: %lld -o %t/with-reexport -lSystem -L%t %t/libReexportNested.tbd %t/libTlvWeak.tbd -lc++ -framework CoreFoundation %t/test.o +# RUN: %lld -o %t/with-reexport -L%t %t/libReexportNested.tbd %t/libTlvWeak.tbd -lc++ -framework CoreFoundation %t/test.o # RUN: llvm-objdump --bind --weak-bind --no-show-raw-insn -d -r %t/with-reexport | FileCheck %s # CHECK: Bind table: diff --git a/lld/test/MachO/tlv-dylib.s b/lld/test/MachO/tlv-dylib.s --- a/lld/test/MachO/tlv-dylib.s +++ b/lld/test/MachO/tlv-dylib.s @@ -3,7 +3,7 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/libtlv.s -o %t/libtlv.o # RUN: %lld -dylib -install_name @executable_path/libtlv.dylib \ -# RUN: -lSystem -o %t/libtlv.dylib %t/libtlv.o +# RUN: -o %t/libtlv.dylib %t/libtlv.o # RUN: llvm-objdump --macho --exports-trie --rebase %t/libtlv.dylib | \ # RUN: FileCheck %s --check-prefix=DYLIB # DYLIB-DAG: _foo [per-thread] @@ -14,14 +14,14 @@ # DYLIB-EMPTY: # RUN: %lld -dylib -install_name @executable_path/libtlv.dylib \ -# RUN: -lSystem -fixup_chains -o %t/libtlv.dylib %t/libtlv.o +# RUN: -fixup_chains -o %t/libtlv.dylib %t/libtlv.o ## Make sure we don't emit fixups in __thread_vars. # RUN: llvm-objdump --macho --chained-fixups %t/libtlv.dylib | \ # RUN: FileCheck %s --check-prefix=CHAINED # CHAINED-NOT: __thread_vars # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o -# RUN: %lld -lSystem -L%t -ltlv %t/test.o -o %t/test +# RUN: %lld -L%t -ltlv %t/test.o -o %t/test # RUN: llvm-objdump --no-print-imm-hex --bind -d --no-show-raw-insn %t/test | FileCheck %s # CHECK: movq [[#]](%rip), %rax ## 0x[[#%x, FOO:]] diff --git a/lld/test/MachO/tlv.s b/lld/test/MachO/tlv.s --- a/lld/test/MachO/tlv.s +++ b/lld/test/MachO/tlv.s @@ -3,24 +3,24 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/regular.s -o %t/regular.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/tbss.s -o %t/tbss.o -# RUN: %lld -lSystem -no_pie -o %t/regular-no-pie %t/regular.o +# RUN: %lld -no_pie -o %t/regular-no-pie %t/regular.o # RUN: llvm-otool -hv %t/regular-no-pie | FileCheck %s --check-prefix=HEADER # RUN: llvm-objdump -d --bind --rebase %t/regular-no-pie | FileCheck %s --check-prefixes=REG,LINKEDIT # RUN: llvm-objdump --macho --section=__DATA,__thread_vars %t/regular-no-pie | \ # RUN: FileCheck %s --check-prefix=REG-TLVP -# RUN: %lld -lSystem %t/regular.o -o %t/regular-pie +# RUN: %lld %t/regular.o -o %t/regular-pie # RUN: llvm-otool -hv %t/regular-pie | FileCheck %s --check-prefix=HEADER # RUN: llvm-objdump -d --bind --rebase %t/regular-pie | FileCheck %s --check-prefixes=REG,LINKEDIT # RUN: llvm-objdump --macho --section=__DATA,__thread_vars %t/regular-pie | \ # RUN: FileCheck %s --check-prefix=REG-TLVP -# RUN: %lld -lSystem %t/tbss.o -o %t/tbss -e _f +# RUN: %lld %t/tbss.o -o %t/tbss -e _f # RUN: llvm-objdump -d --bind --rebase %t/tbss | FileCheck %s --check-prefixes=TBSS,LINKEDIT # RUN: llvm-objdump --macho --section=__DATA,__thread_vars %t/tbss | \ # RUN: FileCheck %s --check-prefix=TBSS-TLVP -# RUN: %lld -lSystem %t/regular.o %t/tbss.o -o %t/regular-and-tbss +# RUN: %lld %t/regular.o %t/tbss.o -o %t/regular-and-tbss # RUN: llvm-objdump -d --bind --rebase %t/regular-and-tbss | FileCheck %s --check-prefixes=REG,TBSS,LINKEDIT # RUN: llvm-objdump --macho --section=__DATA,__thread_vars %t/regular-and-tbss | \ # RUN: FileCheck %s --check-prefix=REG-TBSS-TLVP @@ -28,7 +28,7 @@ ## Check that we always put __thread_bss immediately after __thread_data, ## regardless of the order of the input files. -# RUN: %lld -lSystem %t/tbss.o %t/regular.o -o %t/regular-and-tbss +# RUN: %lld %t/tbss.o %t/regular.o -o %t/regular-and-tbss # RUN: llvm-objdump --section-headers %t/regular-and-tbss | FileCheck %s --check-prefix=SECTIONS # HEADER: MH_HAS_TLV_DESCRIPTORS diff --git a/lld/test/MachO/treat-undef-sym.s b/lld/test/MachO/treat-undef-sym.s --- a/lld/test/MachO/treat-undef-sym.s +++ b/lld/test/MachO/treat-undef-sym.s @@ -13,20 +13,20 @@ # RUN: FileCheck %s -check-prefix=INVAL-WARNING # RUN: not %lld -undefined suppress -o /dev/null %t/live.o 2>&1 | \ # RUN: FileCheck %s -check-prefix=INVAL-SUPPRESS -# RUN: %lld -undefined dynamic_lookup -lSystem -o %t/live.out %t/live.o 2>&1 | count 0 +# RUN: %lld -undefined dynamic_lookup -o %t/live.out %t/live.o 2>&1 | count 0 # RUN: llvm-objdump --macho --lazy-bind %t/live.out \ # RUN: | FileCheck --check-prefix=BIND %s -# RUN: %no-fatal-warnings-lld -lSystem -flat_namespace -undefined warning \ +# RUN: %no-fatal-warnings-lld -flat_namespace -undefined warning \ # RUN: -o %t/live.out %t/live.o 2>&1 | \ # RUN: FileCheck %s -check-prefix=WARNING # RUN: llvm-objdump --macho --lazy-bind %t/live.out \ # RUN: | FileCheck --check-prefix=BIND %s -# RUN: %lld -flat_namespace -lSystem -undefined suppress -o %t/live.out %t/live.o \ +# RUN: %lld -flat_namespace -undefined suppress -o %t/live.out %t/live.o \ # RUN: 2>&1 | count 0 # RUN: llvm-objdump --macho --lazy-bind %t/live.out \ # RUN: | FileCheck --check-prefix=BIND %s -# RUN: %lld -flat_namespace -lSystem -undefined dynamic_lookup -o \ +# RUN: %lld -flat_namespace -undefined dynamic_lookup -o \ # RUN: %t/live.out %t/live.o 2>&1 | count 0 # RUN: llvm-objdump --macho --lazy-bind %t/live.out \ # RUN: | FileCheck --check-prefix=BIND %s diff --git a/lld/test/MachO/u.s b/lld/test/MachO/u.s --- a/lld/test/MachO/u.s +++ b/lld/test/MachO/u.s @@ -6,15 +6,15 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/main.o %t/main.s -# RUN: %lld -lSystem %t/main.o %t/lib.a -o /dev/null -why_load | count 0 +# RUN: %lld %t/main.o %t/lib.a -o /dev/null -why_load | count 0 -# RUN: %lld -lSystem %t/main.o %t/lib.a -u _foo -o /dev/null -why_load | \ +# RUN: %lld %t/main.o %t/lib.a -u _foo -o /dev/null -why_load | \ # RUN: FileCheck %s --check-prefix=FOO # RUN: not %lld %t/main.o %t/lib.a -u _asdf -u _fdsa -o /dev/null 2>&1 | \ # RUN: FileCheck %s --check-prefix=UNDEF -# RUN: %lld -lSystem %t/main.o %t/lib.a -u _asdf -undefined dynamic_lookup -o %t/dyn-lookup +# RUN: %lld %t/main.o %t/lib.a -u _asdf -undefined dynamic_lookup -o %t/dyn-lookup # RUN: llvm-objdump --macho --syms %t/dyn-lookup | FileCheck %s --check-prefix=DYN # FOO: _foo forced load of {{.+}}lib.a(foo.o) diff --git a/lld/test/MachO/uuid.s b/lld/test/MachO/uuid.s --- a/lld/test/MachO/uuid.s +++ b/lld/test/MachO/uuid.s @@ -2,8 +2,8 @@ # UNSUPPORTED: system-windows # RUN: rm -rf %t && mkdir -p %t # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/test.o -# RUN: %lld -lSystem %t/test.o -o %t/a -# RUN: %lld -lSystem %t/test.o -o %t/b +# RUN: %lld %t/test.o -o %t/a +# RUN: %lld %t/test.o -o %t/b # RUN: llvm-dwarfdump --uuid %t/a | awk '{print $2}' > %t/uuida # RUN: llvm-dwarfdump --uuid %t/b | awk '{print $2}' > %t/uuidb # RUN: FileCheck %s < %t/uuida @@ -12,7 +12,7 @@ ## Ensure -final_output is used for universal binaries, which may be linked with ## temporary output file names -# RUN: %lld -lSystem %t/test.o -o %t/c -final_output %t/a +# RUN: %lld %t/test.o -o %t/c -final_output %t/a # RUN: llvm-dwarfdump --uuid %t/c | awk '{print $2}' > %t/uuidc # RUN: cmp %t/uuida %t/uuidc diff --git a/lld/test/MachO/weak-def-can-be-hidden.s b/lld/test/MachO/weak-def-can-be-hidden.s --- a/lld/test/MachO/weak-def-can-be-hidden.s +++ b/lld/test/MachO/weak-def-can-be-hidden.s @@ -85,7 +85,7 @@ ## Combining a regular weak_definition with a weak_def_can_be_hidden produces ## a regular weak external. -# RUN: %lld -dylib -o %t/weak-foo.dylib -lSystem \ +# RUN: %lld -dylib -o %t/weak-foo.dylib \ # RUN: %t/weak-autohide-foo.o %t/weak-foo.o %t/ref-foo.o # RUN: llvm-objdump --syms --exports-trie %t/weak-foo.dylib | \ # RUN: FileCheck --check-prefix=WEAK %s diff --git a/lld/test/MachO/weak-definition-direct-fetch.s b/lld/test/MachO/weak-definition-direct-fetch.s --- a/lld/test/MachO/weak-definition-direct-fetch.s +++ b/lld/test/MachO/weak-definition-direct-fetch.s @@ -42,83 +42,83 @@ ## For dylibs and object files, the non-weak symbol always wins. But the weak ## flag has no effect when we are dealing with two archive symbols. -# RUN: %lld -lSystem -o %t/weak-nonweak-dylibs -L%t -lweakfoo -lfoo %t/refs-foo.o +# RUN: %lld -o %t/weak-nonweak-dylibs -L%t -lweakfoo -lfoo %t/refs-foo.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-nonweak-dylibs | FileCheck %s --check-prefix=PREFER-NONWEAK-DYLIB -# RUN: %lld -lSystem -o %t/nonweak-weak-dylibs -L%t -lfoo -lweakfoo %t/refs-foo.o +# RUN: %lld -o %t/nonweak-weak-dylibs -L%t -lfoo -lweakfoo %t/refs-foo.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/nonweak-weak-dylibs | FileCheck %s --check-prefix=PREFER-NONWEAK-DYLIB -# RUN: %lld -lSystem -o %t/weak-nonweak-objs %t/weakfoo.o %t/foo.o %t/refs-foo.o +# RUN: %lld -o %t/weak-nonweak-objs %t/weakfoo.o %t/foo.o %t/refs-foo.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-nonweak-objs | FileCheck %s --check-prefix=PREFER-NONWEAK-OBJECT -# RUN: %lld -lSystem -o %t/nonweak-weak-objs %t/foo.o %t/weakfoo.o %t/refs-foo.o +# RUN: %lld -o %t/nonweak-weak-objs %t/foo.o %t/weakfoo.o %t/refs-foo.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/nonweak-weak-objs | FileCheck %s --check-prefix=PREFER-NONWEAK-OBJECT -# RUN: %lld -lSystem -o %t/weak-nonweak-archives %t/weakfoo.a %t/foo.a %t/refs-foo.o +# RUN: %lld -o %t/weak-nonweak-archives %t/weakfoo.a %t/foo.a %t/refs-foo.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-nonweak-archives | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT -# RUN: %lld -lSystem -o %t/nonweak-weak-archives %t/foo.a %t/weakfoo.a %t/refs-foo.o +# RUN: %lld -o %t/nonweak-weak-archives %t/foo.a %t/weakfoo.a %t/refs-foo.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/nonweak-weak-archives | FileCheck %s --check-prefix=PREFER-NONWEAK-OBJECT ## The next 5 chunks refs-foo.symbol pairs of different types. ## (Weak) archive symbols take precedence over weak dylib symbols. -# RUN: %lld -lSystem -o %t/weak-dylib-weak-ar -L%t -lweakfoo %t/weakfoo.a %t/refs-foo.o +# RUN: %lld -o %t/weak-dylib-weak-ar -L%t -lweakfoo %t/weakfoo.a %t/refs-foo.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-dylib-weak-ar | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT -# RUN: %lld -lSystem -o %t/weak-ar-weak-dylib -L%t %t/weakfoo.a -lweakfoo %t/refs-foo.o +# RUN: %lld -o %t/weak-ar-weak-dylib -L%t %t/weakfoo.a -lweakfoo %t/refs-foo.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-ar-weak-dylib | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT -# RUN: %lld -lSystem -o %t/weak-dylib-weak-ar -L%t -lweakfoo --start-lib %t/weakfoo.o --end-lib %t/refs-foo.o +# RUN: %lld -o %t/weak-dylib-weak-ar -L%t -lweakfoo --start-lib %t/weakfoo.o --end-lib %t/refs-foo.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-dylib-weak-ar | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT -# RUN: %lld -lSystem -o %t/weak-ar-weak-dylib -L%t --start-lib %t/weakfoo.o --end-lib -lweakfoo %t/refs-foo.o +# RUN: %lld -o %t/weak-ar-weak-dylib -L%t --start-lib %t/weakfoo.o --end-lib -lweakfoo %t/refs-foo.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-ar-weak-dylib | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT ## (Weak) archive symbols have the same precedence as dylib symbols. -# RUN: %lld -lSystem -o %t/weak-ar-nonweak-dylib -L%t %t/weakfoo.a -lfoo %t/refs-foo.o +# RUN: %lld -o %t/weak-ar-nonweak-dylib -L%t %t/weakfoo.a -lfoo %t/refs-foo.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-ar-nonweak-dylib | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT -# RUN: %lld -lSystem -o %t/nonweak-dylib-weak-ar -L%t -lfoo %t/weakfoo.a %t/refs-foo.o +# RUN: %lld -o %t/nonweak-dylib-weak-ar -L%t -lfoo %t/weakfoo.a %t/refs-foo.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/nonweak-dylib-weak-ar | FileCheck %s --check-prefix=PREFER-NONWEAK-DYLIB ## Weak defined symbols take precedence over weak dylib symbols. -# RUN: %lld -lSystem -o %t/weak-dylib-weak-obj -L%t -lweakfoo %t/weakfoo.o %t/refs-foo.o +# RUN: %lld -o %t/weak-dylib-weak-obj -L%t -lweakfoo %t/weakfoo.o %t/refs-foo.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-dylib-weak-obj | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT -# RUN: %lld -lSystem -o %t/weak-obj-weak-dylib -L%t %t/weakfoo.o -lweakfoo %t/refs-foo.o +# RUN: %lld -o %t/weak-obj-weak-dylib -L%t %t/weakfoo.o -lweakfoo %t/refs-foo.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-obj-weak-dylib | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT ## Weak defined symbols take precedence over dylib symbols. -# RUN: %lld -lSystem -o %t/weak-obj-nonweak-dylib -L%t %t/weakfoo.o -lfoo %t/refs-foo.o +# RUN: %lld -o %t/weak-obj-nonweak-dylib -L%t %t/weakfoo.o -lfoo %t/refs-foo.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-obj-nonweak-dylib | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT -# RUN: %lld -lSystem -o %t/nonweak-dylib-weak-obj -L%t -lfoo %t/weakfoo.o %t/refs-foo.o +# RUN: %lld -o %t/nonweak-dylib-weak-obj -L%t -lfoo %t/weakfoo.o %t/refs-foo.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/nonweak-dylib-weak-obj | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT ## Weak defined symbols take precedence over archive symbols. -# RUN: %lld -lSystem -o %t/weak-obj-nonweak-ar %t/weakfoo.o %t/foo.a %t/refs-foo.o +# RUN: %lld -o %t/weak-obj-nonweak-ar %t/weakfoo.o %t/foo.a %t/refs-foo.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-obj-nonweak-ar | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT -# RUN: %lld -lSystem -o %t/nonweak-ar-weak-obj %t/foo.a %t/weakfoo.o %t/refs-foo.o +# RUN: %lld -o %t/nonweak-ar-weak-obj %t/foo.a %t/weakfoo.o %t/refs-foo.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/nonweak-ar-weak-obj | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT ## Regression test: A weak dylib symbol that isn't referenced by an undefined ## symbol should not cause an archive symbol to get loaded. -# RUN: %lld -dylib -lSystem -o %t/weak-ar-weak-unref-dylib -L%t %t/weakfoo.a -lweakfoo +# RUN: %lld -dylib -o %t/weak-ar-weak-unref-dylib -L%t %t/weakfoo.a -lweakfoo # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-ar-weak-unref-dylib | FileCheck %s --check-prefix=NO-SYM -# RUN: %lld -dylib -lSystem -o %t/weak-unref-dylib-weak-ar -L%t -lweakfoo %t/weakfoo.a +# RUN: %lld -dylib -o %t/weak-unref-dylib-weak-ar -L%t -lweakfoo %t/weakfoo.a # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-unref-dylib-weak-ar | FileCheck %s --check-prefix=NO-SYM -# RUN: %lld -dylib -lSystem -o %t/weak-ar-weak-unref-dylib -L%t --start-lib %t/weakfoo.o --end-lib -lweakfoo +# RUN: %lld -dylib -o %t/weak-ar-weak-unref-dylib -L%t --start-lib %t/weakfoo.o --end-lib -lweakfoo # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-ar-weak-unref-dylib | FileCheck %s --check-prefix=NO-SYM -# RUN: %lld -dylib -lSystem -o %t/weak-unref-dylib-weak-ar -L%t -lweakfoo --start-lib %t/weakfoo.o --end-lib +# RUN: %lld -dylib -o %t/weak-unref-dylib-weak-ar -L%t -lweakfoo --start-lib %t/weakfoo.o --end-lib # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-unref-dylib-weak-ar | FileCheck %s --check-prefix=NO-SYM ## However, weak references are sufficient to cause the archive to be loaded. -# RUN: %lld -dylib -lSystem -o %t/weak-ar-weak-ref-weak-dylib -L%t %t/weakfoo.a -lweakfoo %t/weak-refs-foo.o +# RUN: %lld -dylib -o %t/weak-ar-weak-ref-weak-dylib -L%t %t/weakfoo.a -lweakfoo %t/weak-refs-foo.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-ar-weak-ref-weak-dylib | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT -# RUN: %lld -dylib -lSystem -o %t/weak-ref-weak-dylib-weak-ar -L%t -lweakfoo %t/weakfoo.a %t/weak-refs-foo.o +# RUN: %lld -dylib -o %t/weak-ref-weak-dylib-weak-ar -L%t -lweakfoo %t/weakfoo.a %t/weak-refs-foo.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-ref-weak-dylib-weak-ar | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT -# RUN: %lld -dylib -lSystem -o %t/weak-ref-weak-dylib-weak-ar -L%t -lweakfoo %t/weak-refs-foo.o %t/weakfoo.a +# RUN: %lld -dylib -o %t/weak-ref-weak-dylib-weak-ar -L%t -lweakfoo %t/weak-refs-foo.o %t/weakfoo.a # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-ref-weak-dylib-weak-ar | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT -# RUN: %lld -dylib -lSystem -o %t/weak-ar-weak-ref-weak-dylib -L%t --start-lib %t/weakfoo.o --end-lib -lweakfoo %t/weak-refs-foo.o +# RUN: %lld -dylib -o %t/weak-ar-weak-ref-weak-dylib -L%t --start-lib %t/weakfoo.o --end-lib -lweakfoo %t/weak-refs-foo.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-ar-weak-ref-weak-dylib | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT -# RUN: %lld -dylib -lSystem -o %t/weak-ref-weak-dylib-weak-ar -L%t -lweakfoo --start-lib %t/weakfoo.o --end-lib %t/weak-refs-foo.o +# RUN: %lld -dylib -o %t/weak-ref-weak-dylib-weak-ar -L%t -lweakfoo --start-lib %t/weakfoo.o --end-lib %t/weak-refs-foo.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-ref-weak-dylib-weak-ar | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT -# RUN: %lld -dylib -lSystem -o %t/weak-ref-weak-dylib-weak-ar -L%t -lweakfoo %t/weak-refs-foo.o --start-lib %t/weakfoo.o --end-lib +# RUN: %lld -dylib -o %t/weak-ref-weak-dylib-weak-ar -L%t -lweakfoo %t/weak-refs-foo.o --start-lib %t/weakfoo.o --end-lib # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-ref-weak-dylib-weak-ar | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT #--- foo.s diff --git a/lld/test/MachO/weak-definition-gc.s b/lld/test/MachO/weak-definition-gc.s --- a/lld/test/MachO/weak-definition-gc.s +++ b/lld/test/MachO/weak-definition-gc.s @@ -65,9 +65,9 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin19.0.0 %t/weak-aligned-1.s -o %t/weak-aligned-1.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin19.0.0 %t/weak-aligned-2.s -o %t/weak-aligned-2.o -# RUN: %lld -o %t/out -lSystem %t/weak-aligned-1.o %t/weak-aligned-2.o +# RUN: %lld -o %t/out %t/weak-aligned-1.o %t/weak-aligned-2.o # RUN: llvm-objdump --syms --section=__const --full-contents %t/out | FileCheck --check-prefixes=ALIGN,ALIGN2 %s -# RUN: %lld -o %t/out -lSystem %t/weak-aligned-1.o %t/weak-aligned-2.o -dead_strip +# RUN: %lld -o %t/out %t/weak-aligned-1.o %t/weak-aligned-2.o -dead_strip # RUN: llvm-objdump --syms --section=__const --full-contents %t/out | FileCheck --check-prefixes=ALIGN,ALIGN3 %s # ALIGN: SYMBOL TABLE: # ALIGN-DAG: [[#%x, ADDR:]] l O __DATA_CONST,__const .hidden _weak1 diff --git a/lld/test/MachO/weak-definition-in-main-file.s b/lld/test/MachO/weak-definition-in-main-file.s --- a/lld/test/MachO/weak-definition-in-main-file.s +++ b/lld/test/MachO/weak-definition-in-main-file.s @@ -11,7 +11,7 @@ # PREFER-DIRECT-OBJECT-NOT: O __TEXT,weak __foo -# RUN: %lld -lSystem -o %t/out %t/weakfoo.a %t/test.o +# RUN: %lld -o %t/out %t/weakfoo.a %t/test.o # RUN: llvm-objdump --syms %t/out | FileCheck %s --check-prefix=PREFER-DIRECT-OBJECT #--- weakfoo.s diff --git a/lld/test/MachO/weak-definition-indirect-fetch.s b/lld/test/MachO/weak-definition-indirect-fetch.s --- a/lld/test/MachO/weak-definition-indirect-fetch.s +++ b/lld/test/MachO/weak-definition-indirect-fetch.s @@ -18,19 +18,19 @@ # PREFER-NONWEAK-OBJECT: O __TEXT,nonweak _foo -# RUN: %lld -lSystem -o %t/weak-nonweak-archives %t/weakfoo.a %t/foo.a %t/test.o +# RUN: %lld -o %t/weak-nonweak-archives %t/weakfoo.a %t/foo.a %t/test.o # RUN: llvm-objdump --syms %t/weak-nonweak-archives | FileCheck %s --check-prefix=PREFER-NONWEAK-OBJECT -# RUN: %lld -lSystem -o %t/nonweak-weak-archives %t/foo.a %t/weakfoo.a %t/test.o +# RUN: %lld -o %t/nonweak-weak-archives %t/foo.a %t/weakfoo.a %t/test.o # RUN: llvm-objdump --syms %t/nonweak-weak-archives | FileCheck %s --check-prefix=PREFER-NONWEAK-OBJECT -# RUN: %lld -lSystem -o %t/weak-nonweak-objs %t/weakfoo.o %t/foo.o %t/test.o +# RUN: %lld -o %t/weak-nonweak-objs %t/weakfoo.o %t/foo.o %t/test.o # RUN: llvm-objdump --syms %t/weak-nonweak-objs | FileCheck %s --check-prefix=PREFER-NONWEAK-OBJECT -# RUN: %lld -lSystem -o %t/nonweak-weak-objs %t/foo.o %t/weakfoo.o %t/test.o +# RUN: %lld -o %t/nonweak-weak-objs %t/foo.o %t/weakfoo.o %t/test.o # RUN: llvm-objdump --syms %t/nonweak-weak-objs | FileCheck %s --check-prefix=PREFER-NONWEAK-OBJECT -# RUN: %lld -lSystem -o %t/weak-obj-nonweak-ar %t/weakfoo.o %t/foo.a %t/test.o +# RUN: %lld -o %t/weak-obj-nonweak-ar %t/weakfoo.o %t/foo.a %t/test.o # RUN: llvm-objdump --syms %t/weak-obj-nonweak-ar | FileCheck %s --check-prefix=PREFER-NONWEAK-OBJECT -# RUN: %lld -lSystem -o %t/nonweak-ar-weak-obj %t/foo.a %t/weakfoo.o %t/test.o +# RUN: %lld -o %t/nonweak-ar-weak-obj %t/foo.a %t/weakfoo.o %t/test.o # RUN: llvm-objdump --syms %t/nonweak-ar-weak-obj | FileCheck %s --check-prefix=PREFER-NONWEAK-OBJECT #--- foo.s diff --git a/lld/test/MachO/weak-definition-order.s b/lld/test/MachO/weak-definition-order.s --- a/lld/test/MachO/weak-definition-order.s +++ b/lld/test/MachO/weak-definition-order.s @@ -9,9 +9,9 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/weak1.s -o %t/weak1.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/weak2.s -o %t/weak2.o -# RUN: %lld -lSystem -o %t/obj12 %t/weak1.o %t/weak2.o %t/test.o +# RUN: %lld -o %t/obj12 %t/weak1.o %t/weak2.o %t/test.o # RUN: llvm-objdump --syms %t/obj12 | FileCheck %s --check-prefix=WEAK1 -# RUN: %lld -lSystem -o %t/obj21 %t/weak2.o %t/weak1.o %t/test.o +# RUN: %lld -o %t/obj21 %t/weak2.o %t/weak1.o %t/test.o # RUN: llvm-objdump --syms %t/obj21 | FileCheck %s --check-prefix=WEAK2 # WEAK1: O __TEXT,weak1 _foo @@ -22,9 +22,9 @@ # RUN: %lld -dylib -install_name \ # RUN: @executable_path/libweak2.dylib %t/weak2.o -o %t/libweak2.dylib -# RUN: %lld -lSystem -o %t/dylib12 -L%t -lweak1 -lweak2 %t/test.o +# RUN: %lld -o %t/dylib12 -L%t -lweak1 -lweak2 %t/test.o # RUN: llvm-objdump --macho --bind %t/dylib12 | FileCheck %s --check-prefix=DYLIB1 -# RUN: %lld -lSystem -o %t/dylib21 -L%t -lweak2 -lweak1 %t/test.o +# RUN: %lld -o %t/dylib21 -L%t -lweak2 -lweak1 %t/test.o # RUN: llvm-objdump --macho --bind %t/dylib21 | FileCheck %s --check-prefix=DYLIB2 # DYLIB1: __DATA __la_symbol_ptr 0x{{[0-9a-f]*}} pointer 0 libweak1 _foo # DYLIB2: __DATA __la_symbol_ptr 0x{{[0-9a-f]*}} pointer 0 libweak2 _foo diff --git a/lld/test/MachO/weak-definition-over-dysym.s b/lld/test/MachO/weak-definition-over-dysym.s --- a/lld/test/MachO/weak-definition-over-dysym.s +++ b/lld/test/MachO/weak-definition-over-dysym.s @@ -19,14 +19,14 @@ # PREFER-WEAK-OBJECT: O __TEXT,weak _foo # PREFER-NONWEAK-OBJECT: O __TEXT,nonweak _foo -# RUN: %lld -lSystem -o %t/nonweak-dylib-weak-ar -L%t -lfoo %t/weakfoo.a %t/test.o +# RUN: %lld -o %t/nonweak-dylib-weak-ar -L%t -lfoo %t/weakfoo.a %t/test.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/nonweak-dylib-weak-ar | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT -# RUN: %lld -lSystem -o %t/weak-ar-nonweak-dylib -L%t %t/weakfoo.a -lfoo %t/test.o +# RUN: %lld -o %t/weak-ar-nonweak-dylib -L%t %t/weakfoo.a -lfoo %t/test.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-ar-nonweak-dylib | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT -# RUN: %lld -lSystem -o %t/weak-obj-nonweak-dylib -L%t %t/weakfoo.o -lfoo %t/test.o +# RUN: %lld -o %t/weak-obj-nonweak-dylib -L%t %t/weakfoo.o -lfoo %t/test.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-obj-nonweak-dylib | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT -# RUN: %lld -lSystem -o %t/nonweak-dylib-weak-obj -L%t -lfoo %t/weakfoo.o %t/test.o +# RUN: %lld -o %t/nonweak-dylib-weak-obj -L%t -lfoo %t/weakfoo.o %t/test.o # RUN: llvm-objdump --macho --lazy-bind --syms %t/nonweak-dylib-weak-obj | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT #--- libfoo.s diff --git a/lld/test/MachO/weak-header-flags.s b/lld/test/MachO/weak-header-flags.s --- a/lld/test/MachO/weak-header-flags.s +++ b/lld/test/MachO/weak-header-flags.s @@ -6,11 +6,11 @@ # RUN: llvm-readobj --file-headers %t/libweak-defines.dylib | FileCheck %s --check-prefix=WEAK-DEFINES-AND-BINDS # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/binds-to-weak.s -o %t/binds-to-weak.o -# RUN: %lld -lSystem -L%t -lweak-defines -o %t/binds-to-weak %t/binds-to-weak.o +# RUN: %lld -L%t -lweak-defines -o %t/binds-to-weak %t/binds-to-weak.o # RUN: llvm-readobj --file-headers %t/binds-to-weak | FileCheck %s --check-prefix=WEAK-BINDS-ONLY # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/overrides-weak.s -o %t/overrides-weak.o -# RUN: %lld -lSystem -L%t -lweak-defines -o %t/overrides-weak %t/overrides-weak.o +# RUN: %lld -L%t -lweak-defines -o %t/overrides-weak %t/overrides-weak.o # RUN: llvm-readobj --file-headers %t/overrides-weak | FileCheck %s --check-prefix=WEAK-DEFINES-ONLY # WEAK-DEFINES-AND-BINDS: MH_BINDS_TO_WEAK diff --git a/lld/test/MachO/weak-import.s b/lld/test/MachO/weak-import.s --- a/lld/test/MachO/weak-import.s +++ b/lld/test/MachO/weak-import.s @@ -8,20 +8,20 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/bar.s -o %t/bar.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/weak-reexport.s -o %t/weak-reexport.o -# RUN: %lld -lSystem -dylib %t/bar.o -o %t/libbar.dylib -# RUN: %lld -lSystem -dylib %t/foo.o %t/libbar.dylib -sub_library libbar -o %t/libfoo.dylib +# RUN: %lld -dylib %t/bar.o -o %t/libbar.dylib +# RUN: %lld -dylib %t/foo.o %t/libbar.dylib -sub_library libbar -o %t/libfoo.dylib # RUN: %lld -weak-lSystem %t/test.o -weak_framework CoreFoundation -weak_library %t/libfoo.dylib -o %t/basic # RUN: llvm-objdump --macho --all-headers %t/basic | FileCheck %s -DDIR=%t --check-prefixes=WEAK-SYS,WEAK-FOO -# RUN: %lld -weak-lSystem %t/test.o \ -# RUN: -framework CoreFoundation -weak_framework CoreFoundation -framework CoreFoundation \ +# RUN: %lld -weak-lSystem %t/test.o -framework CoreFoundation \ +# RUN: -weak_framework CoreFoundation -framework CoreFoundation \ # RUN: %t/libfoo.dylib -weak_library %t/libfoo.dylib %t/libfoo.dylib -o %t/basic-weak-strong # RUN: llvm-objdump --macho --all-headers %t/basic-weak-strong | FileCheck %s -DDIR=%t --check-prefixes=WEAK-SYS,WEAK-FOO -# RUN: %lld -lSystem -dylib %t/libfoo.dylib %t/weak-ref-only.o -o %t/weak-ref-only +# RUN: %lld -dylib %t/libfoo.dylib %t/weak-ref-only.o -o %t/weak-ref-only # RUN: llvm-objdump --macho --all-headers %t/weak-ref-only | FileCheck %s -DDIR=%t --check-prefixes=SYS,WEAK-FOO -# RUN: %lld -lSystem -dylib %t/libfoo.dylib %t/weak-ref-sub-library.o -o %t/weak-ref-sub-library +# RUN: %lld -dylib %t/libfoo.dylib %t/weak-ref-sub-library.o -o %t/weak-ref-sub-library # RUN: llvm-objdump --macho --all-headers %t/weak-ref-sub-library | FileCheck %s -DDIR=%t --check-prefixes=SYS,WEAK-FOO -# RUN: %lld -lSystem -dylib %t/libfoo.dylib %t/mixed-ref.o -o %t/mixed-ref +# RUN: %lld -dylib %t/libfoo.dylib %t/mixed-ref.o -o %t/mixed-ref # RUN: llvm-objdump --macho --all-headers %t/mixed-ref | FileCheck %s -DDIR=%t --check-prefixes=SYS,FOO # RUN: %lld -framework CoreFoundation %t/test.o -weak_framework CoreFoundation -o %t/strong-weak-import.out diff --git a/lld/test/MachO/weak-reference.s b/lld/test/MachO/weak-reference.s --- a/lld/test/MachO/weak-reference.s +++ b/lld/test/MachO/weak-reference.s @@ -4,17 +4,17 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/strongref.s -o %t/strongref.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/invalid.s -o %t/invalid.o -# RUN: %lld -lSystem -dylib %t/libfoo.o -o %t/libfoo.dylib +# RUN: %lld -dylib %t/libfoo.o -o %t/libfoo.dylib -# RUN: %lld -lSystem %t/test.o %t/libfoo.dylib -o %t/test -# RUN: %lld -fixup_chains -lSystem %t/test.o %t/libfoo.dylib -o %t/chained +# RUN: %lld %t/test.o %t/libfoo.dylib -o %t/test +# RUN: %lld -fixup_chains %t/test.o %t/libfoo.dylib -o %t/chained # RUN: llvm-objdump --macho --syms --bind --lazy-bind %t/test | FileCheck %s --check-prefixes=SYMS,BIND # RUN: llvm-objdump --macho --syms --dyld-info %t/chained | FileCheck %s --check-prefixes=CHAINED ## llvm-objdump doesn't print out all the flags info for lazy & weak bindings, ## so we use obj2yaml instead to test them. # RUN: obj2yaml %t/test | FileCheck %s --check-prefix=YAML -# RUN: %lld -lSystem %t/libfoo.dylib %t/test.o -o %t/test +# RUN: %lld %t/libfoo.dylib %t/test.o -o %t/test # RUN: llvm-objdump --macho --syms --bind --lazy-bind %t/test | FileCheck %s --check-prefixes=SYMS,BIND # RUN: obj2yaml %t/test | FileCheck %s --check-prefix=YAML @@ -61,33 +61,33 @@ ## reference takes priority. NOTE: ld64 actually emits a strong reference if ## the reference is to a function symbol or a TLV. I'm not sure if there's a ## good reason for that, so I'm deviating here for a simpler implementation. -# RUN: %lld -lSystem %t/test.o %t/strongref.o %t/libfoo.dylib -o %t/with-strong -# RUN: %lld -fixup_chains -lSystem %t/test.o %t/strongref.o %t/libfoo.dylib -o %t/with-strong-chained +# RUN: %lld %t/test.o %t/strongref.o %t/libfoo.dylib -o %t/with-strong +# RUN: %lld -fixup_chains %t/test.o %t/strongref.o %t/libfoo.dylib -o %t/with-strong-chained # RUN: llvm-objdump --macho --bind %t/with-strong | FileCheck %s --check-prefix=STRONG-BIND # RUN: llvm-objdump --macho --dyld-info %t/with-strong-chained | FileCheck %s --check-prefix=STRONG-CHAINED # RUN: obj2yaml %t/with-strong | FileCheck %s --check-prefix=STRONG-YAML -# RUN: %lld -lSystem %t/strongref.o %t/test.o %t/libfoo.dylib -o %t/with-strong -# RUN: %lld -fixup_chains -lSystem %t/strongref.o %t/test.o %t/libfoo.dylib -o %t/with-strong-chained +# RUN: %lld %t/strongref.o %t/test.o %t/libfoo.dylib -o %t/with-strong +# RUN: %lld -fixup_chains %t/strongref.o %t/test.o %t/libfoo.dylib -o %t/with-strong-chained # RUN: llvm-objdump --macho --bind %t/with-strong | FileCheck %s --check-prefix=STRONG-BIND # RUN: llvm-objdump --macho --dyld-info %t/with-strong-chained | FileCheck %s --check-prefix=STRONG-CHAINED # RUN: obj2yaml %t/with-strong | FileCheck %s --check-prefix=STRONG-YAML -# RUN: %lld -lSystem %t/libfoo.dylib %t/strongref.o %t/test.o -o %t/with-strong -# RUN: %lld -fixup_chains -lSystem %t/libfoo.dylib %t/strongref.o %t/test.o -o %t/with-strong-chained +# RUN: %lld %t/libfoo.dylib %t/strongref.o %t/test.o -o %t/with-strong +# RUN: %lld -fixup_chains %t/libfoo.dylib %t/strongref.o %t/test.o -o %t/with-strong-chained # RUN: llvm-objdump --macho --bind %t/with-strong | FileCheck %s --check-prefix=STRONG-BIND # RUN: llvm-objdump --macho --dyld-info %t/with-strong-chained | FileCheck %s --check-prefix=STRONG-CHAINED # RUN: obj2yaml %t/with-strong | FileCheck %s --check-prefix=STRONG-YAML -# RUN: %lld -lSystem %t/libfoo.dylib %t/test.o %t/strongref.o -o %t/with-strong -# RUN: %lld -fixup_chains -lSystem %t/libfoo.dylib %t/test.o %t/strongref.o -o %t/with-strong-chained +# RUN: %lld %t/libfoo.dylib %t/test.o %t/strongref.o -o %t/with-strong +# RUN: %lld -fixup_chains %t/libfoo.dylib %t/test.o %t/strongref.o -o %t/with-strong-chained # RUN: llvm-objdump --macho --bind %t/with-strong | FileCheck %s --check-prefix=STRONG-BIND # RUN: llvm-objdump --macho --dyld-info %t/with-strong-chained | FileCheck %s --check-prefix=STRONG-CHAINED # RUN: obj2yaml %t/with-strong | FileCheck %s --check-prefix=STRONG-YAML -# RUN: %lld -lSystem %t/test.o %t/libfoo.dylib %t/strongref.o -o %t/with-strong -# RUN: %lld -fixup_chains -lSystem %t/test.o %t/libfoo.dylib %t/strongref.o -o %t/with-strong-chained +# RUN: %lld %t/test.o %t/libfoo.dylib %t/strongref.o -o %t/with-strong +# RUN: %lld -fixup_chains %t/test.o %t/libfoo.dylib %t/strongref.o -o %t/with-strong-chained # RUN: llvm-objdump --macho --bind %t/with-strong | FileCheck %s --check-prefix=STRONG-BIND # RUN: llvm-objdump --macho --dyld-info %t/with-strong-chained | FileCheck %s --check-prefix=STRONG-CHAINED # RUN: obj2yaml %t/with-strong | FileCheck %s --check-prefix=STRONG-YAML -# RUN: %lld -lSystem %t/strongref.o %t/libfoo.dylib %t/test.o -o %t/with-strong -# RUN: %lld -fixup_chains -lSystem %t/strongref.o %t/libfoo.dylib %t/test.o -o %t/with-strong-chained +# RUN: %lld %t/strongref.o %t/libfoo.dylib %t/test.o -o %t/with-strong +# RUN: %lld -fixup_chains %t/strongref.o %t/libfoo.dylib %t/test.o -o %t/with-strong-chained # RUN: llvm-objdump --macho --bind %t/with-strong | FileCheck %s --check-prefix=STRONG-BIND # RUN: llvm-objdump --macho --dyld-info %t/with-strong-chained | FileCheck %s --check-prefix=STRONG-CHAINED # RUN: obj2yaml %t/with-strong | FileCheck %s --check-prefix=STRONG-YAML @@ -126,7 +126,7 @@ # STRONG-YAML-NEXT: Symbol: _foo_fn ## Weak references must still be satisfied at link time. -# RUN: not %lld -lSystem %t/invalid.o -o /dev/null 2>&1 | FileCheck %s \ +# RUN: not %lld %t/invalid.o -o /dev/null 2>&1 | FileCheck %s \ # RUN: --check-prefix=INVALID -DDIR=%t # INVALID: error: undefined symbol: _missing diff --git a/lld/test/MachO/why-live.s b/lld/test/MachO/why-live.s --- a/lld/test/MachO/why-live.s +++ b/lld/test/MachO/why-live.s @@ -1,7 +1,7 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos %s -o %t.o -# RUN: %lld -lSystem -dead_strip -why_live _foo -why_live _undef -U _undef \ +# RUN: %lld -dead_strip -why_live _foo -why_live _undef -U _undef \ # RUN: -why_live _support -why_live _support_refs_dylib_fun \ # RUN: -why_live _abs %t.o -o /dev/null 2>&1 | FileCheck %s diff --git a/lld/test/MachO/x86-64-objc-stubs.s b/lld/test/MachO/x86-64-objc-stubs.s --- a/lld/test/MachO/x86-64-objc-stubs.s +++ b/lld/test/MachO/x86-64-objc-stubs.s @@ -1,7 +1,7 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o -# RUN: %lld -arch x86_64 -lSystem -o %t.out %t.o +# RUN: %lld -arch x86_64 -o %t.out %t.o # RUN: llvm-objdump --macho --section-headers %t.out > %t.txt # RUN: llvm-otool -vs __DATA __objc_selrefs %t.out >> %t.txt # RUN: llvm-otool -vs __TEXT __objc_stubs %t.out >> %t.txt diff --git a/lld/test/MachO/x86-64-relocs.s b/lld/test/MachO/x86-64-relocs.s --- a/lld/test/MachO/x86-64-relocs.s +++ b/lld/test/MachO/x86-64-relocs.s @@ -1,6 +1,6 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o -# RUN: %lld -lSystem -o %t %t.o +# RUN: %lld -o %t %t.o # RUN: llvm-objdump --no-print-imm-hex --section-headers --syms -d %t | FileCheck %s # CHECK-LABEL: Sections: