Skip to content

Commit 643ec67

Browse files
committed
[lld-macho] Always include custom syslibroot when running tests
This greatly reduces the amount of boilerplate in our tests. Reviewed By: #lld-macho, compnerd Differential Revision: https://reviews.llvm.org/D87960
1 parent 62a3f0c commit 643ec67

File tree

89 files changed

+280
-273
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+280
-273
lines changed

lld/test/MachO/abs-symbols.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# REQUIRES: x86
22
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o
3-
# RUN: lld -flavor darwinnew -syslibroot %S/Inputs/MacOSX.sdk -lSystem %t.o -o %t
3+
# RUN: %lld -lSystem %t.o -o %t
44
# RUN: llvm-objdump --macho --syms --exports-trie %t | FileCheck %s
55

66
# CHECK-LABEL: SYMBOL TABLE:

lld/test/MachO/arch.s

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# REQUIRES: x86
22
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-darwin %s -o %t.o
3-
# RUN: lld -flavor darwinnew -o /dev/null %t.o
4-
# RUN: not lld -flavor darwinnew -arch i386 -o /dev/null %t.o 2>&1 | FileCheck %s
3+
# RUN: %lld -o /dev/null %t.o
4+
# RUN: not %lld -arch i386 -o /dev/null %t.o 2>&1 | FileCheck %s
55
# CHECK: error: missing or unsupported -arch i386
66

77
.text

lld/test/MachO/archive.s

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
# RUN: rm -f %t/test.a
99
# RUN: llvm-ar rcs %t/test.a %t/2.o %t/3.o %t/4.o
10-
# RUN: lld -flavor darwinnew %t/main.o %t/test.a -o %t/test.out
10+
# RUN: %lld %t/main.o %t/test.a -o %t/test.out
1111

1212
## TODO: Run llvm-nm -p to validate symbol order
1313
# RUN: llvm-nm %t/test.out | FileCheck %s
@@ -16,7 +16,7 @@
1616
# CHECK: T _main
1717

1818
## Linking with the archive first in the command line shouldn't change anything
19-
# RUN: lld -flavor darwinnew %t/test.a %t/main.o -o %t/test.out
19+
# RUN: %lld %t/test.a %t/main.o -o %t/test.out
2020
# RUN: llvm-nm %t/test.out | FileCheck %s --check-prefix ARCHIVE-FIRST
2121
# ARCHIVE-FIRST: T _bar
2222
# ARCHIVE-FIRST: T _boo
@@ -26,7 +26,7 @@
2626
# VISIBLE-NOT: T _undefined
2727
# VISIBLE-NOT: T _unused
2828

29-
# RUN: lld -flavor darwinnew %t/test.a %t/main.o -o %t/all-load -all_load
29+
# RUN: %lld %t/test.a %t/main.o -o %t/all-load -all_load
3030
# RUN: llvm-nm %t/all-load | FileCheck %s --check-prefix ALL-LOAD
3131
# ALL-LOAD: T _bar
3232
# ALL-LOAD: T _boo

lld/test/MachO/bss.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# REQUIRES: x86
22
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o
3-
# RUN: lld -flavor darwinnew -o %t %t.o
3+
# RUN: %lld -o %t %t.o
44
# RUN: llvm-readobj --section-headers --macho-segment %t | FileCheck %s
55

66
## Check that __bss takes up zero file size, is at file offset zero, and

lld/test/MachO/common-symbol-coalescing.s

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,26 @@
99

1010
## Check that we pick the definition with the larger size, regardless of
1111
## its alignment.
12-
# RUN: lld -flavor darwinnew %t/test.o %t/smaller-size.o -order_file %t/order -o %t/test
12+
# RUN: %lld %t/test.o %t/smaller-size.o -order_file %t/order -o %t/test
1313
# RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=SMALLER-ALIGNMENT
14-
# RUN: lld -flavor darwinnew %t/smaller-size.o %t/test.o -order_file %t/order -o %t/test
14+
# RUN: %lld %t/smaller-size.o %t/test.o -order_file %t/order -o %t/test
1515
# RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=SMALLER-ALIGNMENT
1616

1717
## When the sizes are equal, we pick the symbol whose file occurs later in the
1818
## command-line argument list.
19-
# RUN: lld -flavor darwinnew %t/test.o %t/same-size.o -order_file %t/order -o %t/test
19+
# RUN: %lld %t/test.o %t/same-size.o -order_file %t/order -o %t/test
2020
# RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=LARGER-ALIGNMENT
21-
# RUN: lld -flavor darwinnew %t/same-size.o %t/test.o -order_file %t/order -o %t/test
21+
# RUN: %lld %t/same-size.o %t/test.o -order_file %t/order -o %t/test
2222
# RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=SMALLER-ALIGNMENT
2323

24-
# RUN: lld -flavor darwinnew %t/test.o %t/zero-align.o -order_file %t/order -o %t/test
24+
# RUN: %lld %t/test.o %t/zero-align.o -order_file %t/order -o %t/test
2525
# RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=LARGER-ALIGNMENT
26-
# RUN: lld -flavor darwinnew %t/zero-align.o %t/test.o -order_file %t/order -o %t/test
26+
# RUN: %lld %t/zero-align.o %t/test.o -order_file %t/order -o %t/test
2727
# RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=LARGER-ALIGNMENT
2828

29-
# RUN: lld -flavor darwinnew %t/test.o %t/zero-align-round-up.o -order_file %t/order -o %t/test
29+
# RUN: %lld %t/test.o %t/zero-align-round-up.o -order_file %t/order -o %t/test
3030
# RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=LARGER-ALIGNMENT
31-
# RUN: lld -flavor darwinnew %t/zero-align-round-up.o %t/test.o -order_file %t/order -o %t/test
31+
# RUN: %lld %t/zero-align-round-up.o %t/test.o -order_file %t/order -o %t/test
3232
# RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=LARGER-ALIGNMENT
3333

3434
# SMALLER-ALIGNMENT-LABEL: Sections:

lld/test/MachO/common-symbol-resolution.s

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o
1010
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/calls-foo.s -o %t/calls-foo.o
1111

12-
# RUN: lld -flavor darwinnew -syslibroot %S/Inputs/MacOSX.sdk -lSystem -order_file %t/order -dylib %t/libfoo.o -o %t/libfoo.dylib
12+
# RUN: %lld -lSystem -order_file %t/order -dylib %t/libfoo.o -o %t/libfoo.dylib
1313

1414
# RUN: rm -f %t/defined.a %t/weak-defined-and-common.a
1515
# RUN: llvm-ar rcs %t/defined.a %t/defined.o
@@ -20,39 +20,39 @@
2020
## regardless of whether it is weak. Moreover, the resolved symbol in the output
2121
## file will always be non-weak, even if the winning input symbol definition was
2222
## weak.
23-
# RUN: lld -flavor darwinnew -syslibroot %S/Inputs/MacOSX.sdk -lSystem -order_file %t/order %t/common.o %t/weak-common.o %t/test.o -o %t/test
23+
# RUN: %lld -lSystem -order_file %t/order %t/common.o %t/weak-common.o %t/test.o -o %t/test
2424
# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=LARGER-COMMON
25-
# RUN: lld -flavor darwinnew -syslibroot %S/Inputs/MacOSX.sdk -lSystem -order_file %t/order %t/weak-common.o %t/common.o %t/test.o -o %t/test
25+
# RUN: %lld -lSystem -order_file %t/order %t/weak-common.o %t/common.o %t/test.o -o %t/test
2626
# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=LARGER-COMMON
2727

2828
## Defined symbols are the only ones that take precedence over common symbols.
29-
# RUN: lld -flavor darwinnew -syslibroot %S/Inputs/MacOSX.sdk -lSystem -order_file %t/order %t/defined.o %t/common.o %t/test.o -o %t/test
29+
# RUN: %lld -lSystem -order_file %t/order %t/defined.o %t/common.o %t/test.o -o %t/test
3030
# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=DEFINED
31-
# RUN: lld -flavor darwinnew -syslibroot %S/Inputs/MacOSX.sdk -lSystem -order_file %t/order %t/common.o %t/defined.o %t/test.o -o %t/test
31+
# RUN: %lld -lSystem -order_file %t/order %t/common.o %t/defined.o %t/test.o -o %t/test
3232
# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=DEFINED
3333

34-
# RUN: lld -flavor darwinnew -syslibroot %S/Inputs/MacOSX.sdk -lSystem -order_file %t/order %t/weak-defined.o %t/common.o %t/test.o -o %t/test
34+
# RUN: %lld -lSystem -order_file %t/order %t/weak-defined.o %t/common.o %t/test.o -o %t/test
3535
# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=WEAK-DEFINED
36-
# RUN: lld -flavor darwinnew -syslibroot %S/Inputs/MacOSX.sdk -lSystem -order_file %t/order %t/common.o %t/weak-defined.o %t/test.o -o %t/test
36+
# RUN: %lld -lSystem -order_file %t/order %t/common.o %t/weak-defined.o %t/test.o -o %t/test
3737
# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=WEAK-DEFINED
3838

3939
## Common symbols take precedence over archive symbols.
40-
# RUN: lld -flavor darwinnew -syslibroot %S/Inputs/MacOSX.sdk -lSystem -order_file %t/order %t/defined.a %t/weak-common.o %t/test.o -o %t/test
40+
# RUN: %lld -lSystem -order_file %t/order %t/defined.a %t/weak-common.o %t/test.o -o %t/test
4141
# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=LARGER-COMMON
42-
# RUN: lld -flavor darwinnew -syslibroot %S/Inputs/MacOSX.sdk -lSystem -order_file %t/order %t/weak-common.o %t/defined.a %t/test.o -o %t/test
42+
# RUN: %lld -lSystem -order_file %t/order %t/weak-common.o %t/defined.a %t/test.o -o %t/test
4343
# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=LARGER-COMMON
4444

4545
## If an archive has both a common and a defined symbol, the defined one should
4646
## win.
47-
# RUN: lld -flavor darwinnew -syslibroot %S/Inputs/MacOSX.sdk -lSystem -order_file %t/order %t/weak-defined-and-common.a %t/calls-foo.o -o %t/calls-foo
47+
# RUN: %lld -lSystem -order_file %t/order %t/weak-defined-and-common.a %t/calls-foo.o -o %t/calls-foo
4848
# RUN: llvm-objdump --syms %t/calls-foo | FileCheck %s --check-prefix=WEAK-DEFINED
49-
# RUN: lld -flavor darwinnew -syslibroot %S/Inputs/MacOSX.sdk -lSystem -order_file %t/order %t/calls-foo.o %t/weak-defined-and-common.a -o %t/calls-foo
49+
# RUN: %lld -lSystem -order_file %t/order %t/calls-foo.o %t/weak-defined-and-common.a -o %t/calls-foo
5050
# RUN: llvm-objdump --syms %t/calls-foo | FileCheck %s --check-prefix=WEAK-DEFINED
5151

5252
## Common symbols take precedence over dylib symbols.
53-
# RUN: lld -flavor darwinnew -syslibroot %S/Inputs/MacOSX.sdk -lSystem -order_file %t/order %t/libfoo.dylib %t/weak-common.o %t/test.o -o %t/test
53+
# RUN: %lld -lSystem -order_file %t/order %t/libfoo.dylib %t/weak-common.o %t/test.o -o %t/test
5454
# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=LARGER-COMMON
55-
# RUN: lld -flavor darwinnew -syslibroot %S/Inputs/MacOSX.sdk -lSystem -order_file %t/order %t/weak-common.o %t/libfoo.dylib %t/test.o -o %t/test
55+
# RUN: %lld -lSystem -order_file %t/order %t/weak-common.o %t/libfoo.dylib %t/test.o -o %t/test
5656
# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=LARGER-COMMON
5757

5858
# LARGER-COMMON-LABEL: SYMBOL TABLE:

lld/test/MachO/compact-unwind-pie.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# REQUIRES: x86
22
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin19.0.0 %s -o %t.o
3-
# RUN: lld -flavor darwinnew -pie -syslibroot %S/Inputs/MacOSX.sdk -lSystem %t.o -o %t
3+
# RUN: %lld -pie -lSystem %t.o -o %t
44
# RUN: llvm-objdump --macho --unwind-info --rebase %t | FileCheck %s
55

66
## Check that we do not add rebase opcodes to the compact unwind section.

lld/test/MachO/compact-unwind.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616

1717
# RUN: %python %S/tools/generate-cfi-funcs.py --seed=johnnyapple >%t.s
1818
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin19.0.0 -o %t.o %t.s
19-
# RUN: lld -flavor darwinnew -Z -L%S/Inputs/MacOSX.sdk/usr/lib -lSystem -o %t %t.o
19+
# RUN: %lld -Z -L%S/Inputs/MacOSX.sdk/usr/lib -lSystem -o %t %t.o
2020
# RUN: llvm-objdump --unwind-info --syms %t %t.o >%t.dump
2121
# RUN: %python %S/tools/validate-unwind-info.py %t.dump

lld/test/MachO/dso-handle.s

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# REQUIRES: x86
22
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o
33

4-
# RUN: lld -flavor darwinnew %t.o -o %t
4+
# RUN: %lld %t.o -o %t
55
# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
66
# CHECK: leaq {{.*}} # 100000000
77
# CHECK-NEXT: leaq {{.*}} # 100000000
88

9-
# RUN: lld -flavor darwinnew -dylib %t.o -o %t.dylib
9+
# RUN: %lld -dylib %t.o -o %t.dylib
1010
# RUN: llvm-objdump -d --no-show-raw-insn %t.dylib | FileCheck %s --check-prefix=DYLIB-CHECK
1111
# DYLIB-CHECK: leaq {{.*}} # 0
1212
# DYLIB-CHECK-NEXT: leaq {{.*}} # 0

lld/test/MachO/dylib.s

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# REQUIRES: x86
22
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o
33

4-
# RUN: lld -flavor darwinnew -dylib -install_name @executable_path/libfoo.dylib \
4+
# RUN: %lld -dylib -install_name @executable_path/libfoo.dylib \
55
# RUN: %t.o -o %t.dylib
66
# RUN: llvm-objdump --macho --dylib-id %t.dylib | FileCheck %s
77
# CHECK: @executable_path/libfoo.dylib
@@ -10,7 +10,7 @@
1010
## a flag for a missing entry symbol (since dylibs don't have entry symbols).
1111
## Also check that we come up with the right install name if one isn't
1212
## specified.
13-
# RUN: lld -flavor darwinnew -dylib %t.o -o %t.defaultInstallName.dylib -e missing_entry
13+
# RUN: %lld -dylib %t.o -o %t.defaultInstallName.dylib -e missing_entry
1414
# RUN: obj2yaml %t.defaultInstallName.dylib | FileCheck %s -DOUTPUT=%t.defaultInstallName.dylib --check-prefix=DEFAULT-INSTALL-NAME
1515
# DEFAULT-INSTALL-NAME: [[OUTPUT]]
1616

lld/test/MachO/dylink-lazy.s

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
# RUN: -o %t/libhello.o
55
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %p/Inputs/libgoodbye.s \
66
# RUN: -o %t/libgoodbye.o
7-
# RUN: lld -flavor darwinnew -dylib -L%S/Inputs/MacOSX.sdk/usr/lib \
7+
# RUN: %lld -dylib \
88
# RUN: -install_name @executable_path/libhello.dylib %t/libhello.o \
99
# RUN: -o %t/libhello.dylib
10-
# RUN: lld -flavor darwinnew -dylib -L%S/Inputs/MacOSX.sdk/usr/lib \
10+
# RUN: %lld -dylib \
1111
# RUN: -install_name @executable_path/libgoodbye.dylib %t/libgoodbye.o \
1212
# RUN: -o %t/libgoodbye.dylib
1313

1414
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/dylink-lazy.o
15-
# RUN: lld -flavor darwinnew -o %t/dylink-lazy \
16-
# RUN: -L%S/Inputs/MacOSX.sdk/usr/lib -L%t -lhello -lgoodbye %t/dylink-lazy.o -lSystem
15+
# RUN: %lld -o %t/dylink-lazy \
16+
# RUN: -L%t -lhello -lgoodbye %t/dylink-lazy.o -lSystem
1717

1818
## When looking at the __stubs section alone, we are unable to easily tell which
1919
## symbol each entry points to. So we call objdump twice in order to get the
@@ -22,8 +22,8 @@
2222
# RUN: (llvm-objdump -d --no-show-raw-insn --syms --rebase --bind --lazy-bind %t/dylink-lazy; \
2323
# RUN: llvm-objdump -D --no-show-raw-insn %t/dylink-lazy) | FileCheck %s
2424

25-
# RUN: lld -flavor darwinnew -pie -o %t/dylink-lazy-pie \
26-
# RUN: -L%S/Inputs/MacOSX.sdk/usr/lib -L%t -lhello -lgoodbye %t/dylink-lazy.o -lSystem
25+
# RUN: %lld -pie -o %t/dylink-lazy-pie \
26+
# RUN: -L%t -lhello -lgoodbye %t/dylink-lazy.o -lSystem
2727
# RUN: llvm-objdump --macho --rebase %t/dylink-lazy-pie | FileCheck %s --check-prefix=PIE
2828

2929
# CHECK-LABEL: SYMBOL TABLE:

lld/test/MachO/dylink.s

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
# RUN: -o %t/libhello.o
55
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %p/Inputs/libgoodbye.s \
66
# RUN: -o %t/libgoodbye.o
7-
# RUN: lld -flavor darwinnew -dylib -install_name \
7+
# RUN: %lld -dylib -install_name \
88
# RUN: @executable_path/libhello.dylib %t/libhello.o -o %t/libhello.dylib
9-
# RUN: lld -flavor darwinnew -dylib -install_name \
9+
# RUN: %lld -dylib -install_name \
1010
# RUN: @executable_path/libgoodbye.dylib %t/libgoodbye.o -o %t/libgoodbye.dylib
1111

1212
## Make sure we are using the export trie and not the symbol table when linking
@@ -18,7 +18,7 @@
1818
# NOSYM: no symbols
1919

2020
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/dylink.o
21-
# RUN: lld -flavor darwinnew -o %t/dylink -Z -L%t -lhello -lgoodbye %t/dylink.o
21+
# RUN: %lld -o %t/dylink -L%t -lhello -lgoodbye %t/dylink.o
2222
# RUN: llvm-objdump --bind -d --no-show-raw-insn %t/dylink | FileCheck %s
2323

2424
# CHECK: movq [[#%u, HELLO_OFF:]](%rip), %rsi

lld/test/MachO/entry-symbol.s

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# RUN: split-file %s %t
33
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/not-main.s -o %t/not-main.o
44
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/libfoo.s -o %t/libfoo.o
5-
# RUN: lld -flavor darwinnew -syslibroot %S/Inputs/MacOSX.sdk -lSystem -dylib %t/libfoo.o -o %t/libfoo.dylib
5+
# RUN: %lld -lSystem -dylib %t/libfoo.o -o %t/libfoo.dylib
66

7-
# RUN: lld -flavor darwinnew -o %t/not-main %t/not-main.o -e _not_main
7+
# RUN: %lld -o %t/not-main %t/not-main.o -e _not_main
88
# RUN: llvm-objdump --macho --all-headers --syms %t/not-main | FileCheck %s
99
# CHECK-LABEL: SYMBOL TABLE
1010
# CHECK-NEXT: {{0*}}[[#%x, ENTRY_ADDR:]] {{.*}} __TEXT,__text _not_main
@@ -19,7 +19,7 @@
1919
# CHECK-NEXT: size
2020
# CHECK-NEXT: offset [[#ENTRYOFF]]
2121

22-
# RUN: lld -flavor darwinnew -syslibroot %S/Inputs/MacOSX.sdk -lSystem -o %t/dysym-main %t/not-main.o %t/libfoo.dylib -e _dysym_main
22+
# RUN: %lld -lSystem -o %t/dysym-main %t/not-main.o %t/libfoo.dylib -e _dysym_main
2323
# RUN: llvm-objdump --macho --all-headers --indirect-symbols --lazy-bind %t/dysym-main | FileCheck %s --check-prefix=DYSYM
2424
# DYSYM-LABEL: Indirect symbols for (__TEXT,__stubs) 1 entries
2525
# DYSYM-NEXT: address index name
@@ -31,7 +31,7 @@
3131
# DYSYM-NEXT: segment section address dylib symbol
3232
# DYSYM-NEXT: __DATA __la_symbol_ptr {{.*}} libfoo _dysym_main
3333

34-
# RUN: lld -flavor darwinnew -syslibroot %S/Inputs/MacOSX.sdk -lSystem -o %t/weak-dysym-main %t/not-main.o %t/libfoo.dylib -e _weak_dysym_main
34+
# RUN: %lld -lSystem -o %t/weak-dysym-main %t/not-main.o %t/libfoo.dylib -e _weak_dysym_main
3535
# RUN: llvm-objdump --macho --all-headers --indirect-symbols --bind --weak-bind %t/weak-dysym-main | FileCheck %s --check-prefix=WEAK-DYSYM
3636
# WEAK-DYSYM-LABEL: Indirect symbols for (__TEXT,__stubs) 1 entries
3737
# WEAK-DYSYM-NEXT: address index name
@@ -46,9 +46,9 @@
4646
# WEAK-DYSYM-NEXT: segment section address type addend symbol
4747
# WEAK-DYSYM-NEXT: __DATA __la_symbol_ptr {{.*}} pointer 0 _weak_dysym_main
4848

49-
# RUN: not lld -flavor darwinnew -o /dev/null %t/not-main.o -e _missing 2>&1 | FileCheck %s --check-prefix=UNDEFINED
49+
# RUN: not %lld -o /dev/null %t/not-main.o -e _missing 2>&1 | FileCheck %s --check-prefix=UNDEFINED
5050
# UNDEFINED: error: undefined symbol: _missing
51-
# RUN: not lld -flavor darwinnew -o /dev/null %t/not-main.o 2>&1 | FileCheck %s --check-prefix=DEFAULT-ENTRY
51+
# RUN: not %lld -o /dev/null %t/not-main.o 2>&1 | FileCheck %s --check-prefix=DEFAULT-ENTRY
5252
# DEFAULT-ENTRY: error: undefined symbol: _main
5353

5454
#--- libfoo.s

lld/test/MachO/export-trie.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
## the image base starts at a non-zero address. This allows us to verify that
77
## addresses in the export trie are correctly encoded as relative to the image
88
## base.
9-
# RUN: lld -flavor darwinnew %t.o -o %t
9+
# RUN: %lld %t.o -o %t
1010

1111
# RUN: llvm-objdump --syms --exports-trie %t | FileCheck %s --check-prefix=EXPORTS
1212
# EXPORTS-LABEL: SYMBOL TABLE:

lld/test/MachO/fat-arch.s

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# RUN: llvm-mc -filetype=obj -triple=i386-apple-darwin %s -o %t.i386.o
33
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.x86_64.o
44
# RUN: llvm-lipo %t.i386.o %t.x86_64.o -create -o %t.fat.o
5-
# RUN: lld -flavor darwinnew -o /dev/null %t.fat.o
5+
# RUN: %lld -o /dev/null %t.fat.o
66

77
# RUN: llvm-lipo %t.i386.o -create -o %t.noarch.o
8-
# RUN: not lld -flavor darwinnew -o /dev/null %t.noarch.o 2>&1 | \
8+
# RUN: not %lld -o /dev/null %t.noarch.o 2>&1 | \
99
# RUN: FileCheck %s -DFILE=%t.noarch.o
1010
# CHECK: error: unable to find matching architecture in [[FILE]]
1111

lld/test/MachO/filelist.s

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,25 @@
1313

1414
# RUN: echo "%t/first.o" > filelist
1515
# RUN: echo "%t/second.o" >> filelist
16-
# RUN: lld -flavor darwinnew -Z -filelist filelist %t/test.o -o %t/test
16+
# RUN: %lld -filelist filelist %t/test.o -o %t/test
1717
# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=FIRST
1818

1919
# RUN: echo "%t/second.o" > filelist
2020
# RUN: echo "%t/first.o" >> filelist
21-
# RUN: lld -flavor darwinnew -Z -filelist filelist %t/test.o -o %t/test
21+
# RUN: %lld -filelist filelist %t/test.o -o %t/test
2222
# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=SECOND
2323

2424
# RUN: echo "%t/first.o" > filelist
25-
# RUN: lld -flavor darwinnew -Z -filelist filelist %t/second.o %t/test.o -o %t/test
25+
# RUN: %lld -filelist filelist %t/second.o %t/test.o -o %t/test
2626
# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=FIRST
27-
# RUN: lld -flavor darwinnew -Z %t/second.o -filelist filelist %t/test.o -o %t/test
27+
# RUN: %lld %t/second.o -filelist filelist %t/test.o -o %t/test
2828
# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=SECOND
2929

3030
# RUN: echo "%t/first.o" > filelist-1
3131
# RUN: echo "%t/second.o" > filelist-2
32-
# RUN: lld -flavor darwinnew -Z -filelist filelist-1 -filelist filelist-2 %t/test.o -o %t/test
32+
# RUN: %lld -filelist filelist-1 -filelist filelist-2 %t/test.o -o %t/test
3333
# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=FIRST
34-
# RUN: lld -flavor darwinnew -Z -filelist filelist-2 -filelist filelist-1 %t/test.o -o %t/test
34+
# RUN: %lld -filelist filelist-2 -filelist filelist-1 %t/test.o -o %t/test
3535
# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=SECOND
3636

3737
.globl _main

lld/test/MachO/force-load.s

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
# RUN: echo ".section __TEXT,obj; .globl _foo; .weak_definition _foo; _foo:" | llvm-mc -filetype=obj -triple=x86_64-apple-darwin -o %t/foo.o
77
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/test.o
88

9-
# RUN: lld -flavor darwinnew -force_load %t/foo.a %t/foo.o %t/test.o -o %t/test-force-load-first
9+
# RUN: %lld -force_load %t/foo.a %t/foo.o %t/test.o -o %t/test-force-load-first
1010
# FORCE-LOAD-FIRST: __TEXT,archive _foo
1111
# RUN: llvm-objdump --syms %t/test-force-load-first | FileCheck %s --check-prefix=FORCE-LOAD-FIRST
1212

13-
# RUN: lld -flavor darwinnew %t/foo.o -force_load %t/foo.a %t/test.o -o %t/test-force-load-second
13+
# RUN: %lld %t/foo.o -force_load %t/foo.a %t/test.o -o %t/test-force-load-second
1414
# RUN: llvm-objdump --syms %t/test-force-load-second | FileCheck %s --check-prefix=FORCE-LOAD-SECOND
1515
# FORCE-LOAD-SECOND: __TEXT,obj _foo
1616

0 commit comments

Comments
 (0)