Skip to content

Commit 415c0cd

Browse files
committed
[lld-macho] Switch default to new Darwin backend
The new Darwin backend for LLD is now able to link reasonably large real-world programs on x86_64. For instance, we have achieved self-hosting for the X86_64 target, where all LLD tests pass when building lld with itself on macOS. As such, we would like to make it the default back-end. The new port is now named `ld64.lld`, and the old port remains accessible as `ld64.lld.darwinold` This [annoucement email][1] has some context. (But note that, unlike what the email says, we are no longer doing this as part of the LLVM 12 branch cut -- instead we will go into LLVM 13.) Numerous mechanical test changes were required to make this change; in the interest of creating something that's reviewable on Phabricator, I've split out the boring changes into a separate diff (D95905). I plan to merge its contents with those in this diff before landing. (@gkm made the original draft of this diff, and he has agreed to let me take over.) [1]: https://lists.llvm.org/pipermail/llvm-dev/2021-January/147665.html Reviewed By: #lld-macho, thakis Differential Revision: https://reviews.llvm.org/D95204
1 parent f083f65 commit 415c0cd

File tree

150 files changed

+250
-251
lines changed

Some content is hidden

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

150 files changed

+250
-251
lines changed

clang/lib/Driver/ToolChain.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -620,11 +620,11 @@ std::string ToolChain::GetLinkerPath(bool *LinkerIsLLD,
620620

621621
std::string LinkerPath(GetProgramPath(LinkerName.c_str()));
622622
if (llvm::sys::fs::can_execute(LinkerPath)) {
623-
// FIXME: Remove lld.darwinnew here once it's the only MachO lld.
623+
// FIXME: Remove LinkerIsLLDDarwinNew once there's only one MachO lld.
624624
if (LinkerIsLLD)
625-
*LinkerIsLLD = UseLinker == "lld" || UseLinker == "lld.darwinnew";
625+
*LinkerIsLLD = UseLinker == "lld" || UseLinker == "lld.darwinold";
626626
if (LinkerIsLLDDarwinNew)
627-
*LinkerIsLLDDarwinNew = UseLinker == "lld.darwinnew";
627+
*LinkerIsLLDDarwinNew = UseLinker == "lld";
628628
return LinkerPath;
629629
}
630630
}
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
// With -fuse-ld=lld, -demangle is always passed to the linker on Darwin.
22
// REQUIRES: shell
33

4+
// FIXME: Remove this test case when we remove the lld.darwinold backend.
45
// RUN: %clang --target=x86_64-apple-darwin -### \
5-
// RUN: -fuse-ld=lld -B%S/Inputs/lld -mlinker-version=0 %s 2>&1 \
6+
// RUN: -fuse-ld=lld.darwinold -B%S/Inputs/lld -mlinker-version=0 %s 2>&1 \
67
// RUN: | FileCheck %s
7-
// FIXME: Remove ld.darwinnew once it's the default (and only) mach-o lld.
8+
89
// RUN: %clang --target=x86_64-apple-darwin -### \
9-
// RUN: -fuse-ld=lld.darwinnew -B%S/Inputs/lld -mlinker-version=0 %s 2>&1 \
10+
// RUN: -fuse-ld=lld -B%S/Inputs/lld -mlinker-version=0 %s 2>&1 \
1011
// RUN: | FileCheck %s
1112

1213
// CHECK: "-demangle"

clang/test/Driver/darwin-ld-platform-version-ios.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: touch %t.o
22

3-
// RUN: %clang -target arm64-apple-ios12.3 -fuse-ld= \
3+
// RUN: %clang -target arm64-apple-ios12.3 -fuse-ld=lld.darwinold \
44
// RUN: -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=0 \
55
// RUN: -### %t.o 2>&1 \
66
// RUN: | FileCheck --check-prefix=LINKER-OLD %s
@@ -12,15 +12,15 @@
1212
// RUN: -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=520 \
1313
// RUN: -### %t.o 2>&1 \
1414
// RUN: | FileCheck --check-prefix=LINKER-NEW %s
15-
// RUN: %clang -target arm64-apple-ios12.3 -fuse-ld=lld.darwinnew \
15+
// RUN: %clang -target arm64-apple-ios12.3 -fuse-ld=lld \
1616
// RUN: -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=0 \
1717
// RUN: -### %t.o -B%S/Inputs/lld 2>&1 \
1818
// RUN: | FileCheck --check-prefix=LINKER-NEW %s
1919
// RUN: %clang -target x86_64-apple-ios13-simulator -fuse-ld= \
2020
// RUN: -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=520 \
2121
// RUN: -### %t.o 2>&1 \
2222
// RUN: | FileCheck --check-prefix=SIMUL %s
23-
// RUN: %clang -target x86_64-apple-ios13-simulator -fuse-ld=lld.darwinnew \
23+
// RUN: %clang -target x86_64-apple-ios13-simulator -fuse-ld=lld \
2424
// RUN: -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=0 \
2525
// RUN: -### %t.o -B%S/Inputs/lld 2>&1 \
2626
// RUN: | FileCheck --check-prefix=SIMUL %s

clang/test/Driver/darwin-ld-platform-version-macos.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// RUN: touch %t.o
22

3-
// RUN: %clang -target x86_64-apple-macos10.13 -fuse-ld= \
3+
// RUN: %clang -target x86_64-apple-macos10.13 -fuse-ld=lld.darwinold \
44
// RUN: -isysroot %S/Inputs/MacOSX10.14.sdk -mlinker-version=0 \
55
// RUN: -### %t.o 2>&1 \
66
// RUN: | FileCheck --check-prefix=LINKER-OLD %s
7-
// RUN: %clang -target x86_64-apple-macos10.13 -fuse-ld=lld.darwinnew \
7+
// RUN: %clang -target x86_64-apple-macos10.13 -fuse-ld=lld \
88
// RUN: -isysroot %S/Inputs/MacOSX10.14.sdk -mlinker-version=0 \
99
// RUN: -### %t.o -B%S/Inputs/lld 2>&1 \
1010
// RUN: | FileCheck --check-prefix=LINKER-NEW %s
@@ -21,7 +21,7 @@
2121
// RUN: -isysroot %S/Inputs/MacOSX10.14.sdk -mlinker-version=400 \
2222
// RUN: -### %t.o 2>&1 \
2323
// RUN: | FileCheck --check-prefix=ARM64_OLD %s
24-
// RUN: %clang -target arm64-apple-macos10.13 -fuse-ld=lld.darwinnew \
24+
// RUN: %clang -target arm64-apple-macos10.13 -fuse-ld=lld \
2525
// RUN: -isysroot %S/Inputs/MacOSX10.14.sdk -mlinker-version=400 \
2626
// RUN: -### %t.o -B%S/Inputs/lld 2>&1 \
2727
// RUN: | FileCheck --check-prefix=ARM64_NEW %s

clang/test/Driver/darwin-ld-platform-version-tvos.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// RUN: touch %t.o
22

3-
// RUN: %clang -target arm64-apple-tvos12.3 -fuse-ld= \
3+
// RUN: %clang -target arm64-apple-tvos12.3 -fuse-ld=lld.darwinold \
44
// RUN: -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=0 \
55
// RUN: -### %t.o 2>&1 \
66
// RUN: | FileCheck --check-prefix=LINKER-OLD %s
77
// RUN: %clang -target arm64-apple-tvos12.3 -fuse-ld= \
88
// RUN: -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=400 \
99
// RUN: -### %t.o 2>&1 \
1010
// RUN: | FileCheck --check-prefix=LINKER-OLD %s
11-
// RUN: %clang -target arm64-apple-tvos12.3 -fuse-ld=lld.darwinnew \
11+
// RUN: %clang -target arm64-apple-tvos12.3 -fuse-ld=lld \
1212
// RUN: -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=0 \
1313
// RUN: -### %t.o -B%S/Inputs/lld 2>&1 \
1414
// RUN: | FileCheck --check-prefix=LINKER-NEW %s

clang/test/Driver/darwin-ld-platform-version-watchos.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// RUN: touch %t.o
22

3-
// RUN: %clang -target arm64_32-apple-watchos5.2 -fuse-ld= \
3+
// RUN: %clang -target arm64_32-apple-watchos5.2 -fuse-ld=lld.darwinold \
44
// RUN: -isysroot %S/Inputs/WatchOS6.0.sdk -mlinker-version=0 \
55
// RUN: -### %t.o 2>&1 \
66
// RUN: | FileCheck --check-prefix=LINKER-OLD %s
77
// RUN: %clang -target arm64_32-apple-watchos5.2 -fuse-ld= \
88
// RUN: -isysroot %S/Inputs/WatchOS6.0.sdk -mlinker-version=400 \
99
// RUN: -### %t.o 2>&1 \
1010
// RUN: | FileCheck --check-prefix=LINKER-OLD %s
11-
// RUN: %clang -target arm64_32-apple-watchos5.2 -fuse-ld=lld.darwinnew \
11+
// RUN: %clang -target arm64_32-apple-watchos5.2 -fuse-ld=lld \
1212
// RUN: -isysroot %S/Inputs/WatchOS6.0.sdk -mlinker-version=0 \
1313
// RUN: -### %t.o -B%S/Inputs/lld 2>&1 \
1414
// RUN: | FileCheck --check-prefix=LINKER-NEW %s

lld/test/MachO/invalid/stub-link.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# RUN: mkdir -p %t
77
#
88
# RUN: llvm-mc -filetype obj -triple x86_64-apple-ios %s -o %t/test.o
9-
# RUN: not lld -flavor darwinnew -o %t/test -syslibroot %S/../Inputs/iPhoneSimulator.sdk -lSystem %t/test.o 2>&1 | FileCheck %s
9+
# RUN: not ld64.lld -o %t/test -syslibroot %S/../Inputs/iPhoneSimulator.sdk -lSystem %t/test.o 2>&1 | FileCheck %s
1010

1111
# CHECK-DAG: error: undefined symbol: __cache_handle_memory_pressure_event
1212
# CHECK-DAG: error: undefined symbol: _from_non_reexported_tapi_dylib

lld/test/MachO/lit.local.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import os
44

5-
lld = ('lld -flavor darwinnew -syslibroot ' +
5+
lld = ('ld64.lld -syslibroot ' +
66
os.path.join(config.test_source_root, "MachO", "Inputs", "MacOSX.sdk"))
77
config.substitutions.append(('%lld', lld + ' -fatal_warnings'))
88
config.substitutions.append(('%no_fatal_warnings_lld', lld))

lld/test/MachO/search-paths-darwin.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ REQUIRES: darwin
33

44
RUN: mkdir -p %t1 %t2
55

6-
RUN: lld -flavor darwinnew -arch x86_64 -v -L%t1 -F%t2 2>&1 | FileCheck -DLDIR=%t1 -DFDIR=%t2 %s
6+
RUN: ld64.lld -arch x86_64 -v -L%t1 -F%t2 2>&1 | FileCheck -DLDIR=%t1 -DFDIR=%t2 %s
77
CHECK: Library search paths:
88
CHECK-NEXT: [[LDIR]]
99
CHECK-NEXT: /usr/lib
@@ -13,7 +13,7 @@ CHECK-NEXT: [[FDIR]]
1313
CHECK-NEXT: /Library/Frameworks
1414
CHECK-NEXT: /System/Library/Frameworks
1515

16-
RUN: lld -flavor darwinnew -arch x86_64 -v -L%t1 -F%t2 -Z 2>&1 | FileCheck -DLDIR=%t1 -DFDIR=%t2 --check-prefix=CHECK_Z %s
16+
RUN: ld64.lld -arch x86_64 -v -L%t1 -F%t2 -Z 2>&1 | FileCheck -DLDIR=%t1 -DFDIR=%t2 --check-prefix=CHECK_Z %s
1717
CHECK_Z: Library search paths:
1818
CHECK_Z-NEXT: [[LDIR]]
1919
CHECK_Z-NEXT: Framework search paths:

lld/test/MachO/syslibroot.test

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
11
# Ensure that a nonexistent path is ignored with a syslibroot
22

3-
RUN: lld -flavor darwinnew -v -syslibroot /var/empty | FileCheck %s -check-prefix CHECK-NONEXISTENT-SYSLIBROOT
3+
RUN: ld64.lld -v -syslibroot /var/empty | FileCheck %s -check-prefix CHECK-NONEXISTENT-SYSLIBROOT
44

55
CHECK-NONEXISTENT-SYSLIBROOT: Library search paths:
66
CHECK-NONEXISTENT-SYSLIBROOT-NEXT: Framework search paths:
77

88
RUN: mkdir -p %t/usr/lib
9-
RUN: lld -flavor darwinnew -v -syslibroot %t 2>&1 | FileCheck %s -check-prefix CHECK-SYSLIBROOT -DROOT=%t
9+
RUN: ld64.lld -v -syslibroot %t 2>&1 | FileCheck %s -check-prefix CHECK-SYSLIBROOT -DROOT=%t
1010

1111
CHECK-SYSLIBROOT-NOT: directory not found{{.*}}usr/local/lib
1212
CHECK-SYSLIBROOT: Library search paths:
1313
CHECK-SYSLIBROOT-NEXT: [[ROOT]]/usr/lib
1414

1515
RUN: mkdir -p %t/Library/libxml2-development
16-
RUN: lld -flavor darwinnew -v -syslibroot %t -L /Library/libxml2-development | FileCheck %s -check-prefix CHECK-ABSOLUTE-PATH-REROOTED -DROOT=%t
16+
RUN: ld64.lld -v -syslibroot %t -L /Library/libxml2-development | FileCheck %s -check-prefix CHECK-ABSOLUTE-PATH-REROOTED -DROOT=%t
1717

1818
CHECK-ABSOLUTE-PATH-REROOTED: Library search paths:
1919
CHECK-ABSOLUTE-PATH-REROOTED: [[ROOT]]/Library/libxml2-development
2020
CHECK-ABSOLUTE-PATH-REROOTED: [[ROOT]]/usr/lib
2121

22-
RUN: lld -flavor darwinnew -v -syslibroot %t -L %t/Library/libxml2-development | FileCheck %s -check-prefix CHECK-PATH-WITHOUT-REROOT -DPATH=%t/Library/libxml2-development
22+
RUN: ld64.lld -v -syslibroot %t -L %t/Library/libxml2-development | FileCheck %s -check-prefix CHECK-PATH-WITHOUT-REROOT -DPATH=%t/Library/libxml2-development
2323
CHECK-PATH-WITHOUT-REROOT: Library search paths:
2424
CHECK-PATH-WITHOUT-REROOT-NEXT: [[PATH]]
2525

2626
RUN: mkdir -p %t.2/usr/lib
27-
RUN: lld -flavor darwinnew -v -syslibroot %t -syslibroot %t.2 | FileCheck %s -check-prefix CHECK-SYSLIBROOT-MATRIX -DROOT=%t
27+
RUN: ld64.lld -v -syslibroot %t -syslibroot %t.2 | FileCheck %s -check-prefix CHECK-SYSLIBROOT-MATRIX -DROOT=%t
2828

2929
CHECK-SYSLIBROOT-MATRIX: Library search paths:
3030
CHECK-SYSLIBROOT-MATRIX: [[ROOT]]/usr/lib
3131
CHECK-SYSLIBROOT-MATRIX: [[ROOT]].2/usr/lib
3232

33-
RUN: lld -flavor darwinnew -v -syslibroot %t -syslibroot %t.2 -syslibroot / | FileCheck %s -check-prefix CHECK-SYSLIBROOT-IGNORED -DROOT=%t
33+
RUN: ld64.lld -v -syslibroot %t -syslibroot %t.2 -syslibroot / | FileCheck %s -check-prefix CHECK-SYSLIBROOT-IGNORED -DROOT=%t
3434

3535
CHECK-SYSLIBROOT-IGNORED: Library search paths:
3636
CHECK-SYSLIBROOT-IGNORED-NOT: [[ROOT]]/usr/lib
3737
CHECK-SYSLIBROOT-IGNORED-NOT: [[ROOT]].2/usr/lib
3838

3939
RUN: mkdir -p %t/System/Library/Frameworks
40-
RUN: lld -flavor darwinnew -v -syslibroot %t | FileCheck %s -check-prefix CHECK-SYSLIBROOT-FRAMEWORK -DROOT=%t
40+
RUN: ld64.lld -v -syslibroot %t | FileCheck %s -check-prefix CHECK-SYSLIBROOT-FRAMEWORK -DROOT=%t
4141

4242
CHECK-SYSLIBROOT-FRAMEWORK: Framework search paths:
4343
CHECK-SYSLIBROOT-FRAMEWORK: [[ROOT]]/System/Library/Frameworks
4444

4545
RUN: mkdir -p %t/Library/Frameworks
4646
RUN: mkdir -p %t.2/Library/Frameworks
47-
RUN: lld -flavor darwinnew -v -syslibroot %t -syslibroot %t.2 -F /Library/Frameworks | FileCheck %s -check-prefix CHECK-SYSLIBROOT-FRAMEWORK-MATRIX -DROOT=%t
47+
RUN: ld64.lld -v -syslibroot %t -syslibroot %t.2 -F /Library/Frameworks | FileCheck %s -check-prefix CHECK-SYSLIBROOT-FRAMEWORK-MATRIX -DROOT=%t
4848

4949
CHECK-SYSLIBROOT-FRAMEWORK-MATRIX: Framework search paths:
5050
CHECK-SYSLIBROOT-FRAMEWORK-MATRIX: [[ROOT]]/Library/Frameworks
5151
CHECK-SYSLIBROOT-FRAMEWORK-MATRIX: [[ROOT]].2/Library/Frameworks
5252

53-
RUN: lld -flavor darwinnew -v -syslibroot %t -syslibroot %t.2 -syslibroot / -F /Library/Frameworks | FileCheck %s -check-prefix CHECK-SYSLIBROOT-FRAMEWORK-IGNORED -DROOT=%t
53+
RUN: ld64.lld -v -syslibroot %t -syslibroot %t.2 -syslibroot / -F /Library/Frameworks | FileCheck %s -check-prefix CHECK-SYSLIBROOT-FRAMEWORK-IGNORED -DROOT=%t
5454

5555
CHECK-SYSLIBROOT-FRAMEWORK-IGNORED: Framework search paths:
5656
CHECK-SYSLIBROOT-FRAMEWORK-IGNORED-NOT: [[ROOT]]/Library/Frameworks

lld/test/darwin/cmdline-lto_library.objtxt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: ld64.lld -arch x86_64 -lto_library %t -print-atoms -r %s 2>&1 | FileCheck %s
1+
# RUN: ld64.lld.darwinold -arch x86_64 -lto_library %t -print-atoms -r %s 2>&1 | FileCheck %s
22
#
33
# Test that the -lto_library option does not result in an error.
44
#

lld/test/darwin/cmdline-objc_gc.objtxt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: not ld64.lld -arch x86_64 -objc_gc %s 2>&1 | FileCheck %s
1+
# RUN: not ld64.lld.darwinold -arch x86_64 -objc_gc %s 2>&1 | FileCheck %s
22
#
33
# Test that the -objc_gc is rejected.
44
#

lld/test/darwin/cmdline-objc_gc_compaction.objtxt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: not ld64.lld -arch x86_64 -objc_gc_compaction %s 2>&1 | FileCheck %s
1+
# RUN: not ld64.lld.darwinold -arch x86_64 -objc_gc_compaction %s 2>&1 | FileCheck %s
22
#
33
# Test that the -objc_gc_compaction is rejected.
44
#

lld/test/darwin/cmdline-objc_gc_only.objtxt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: not ld64.lld -arch x86_64 -objc_gc_only %s 2>&1 | FileCheck %s
1+
# RUN: not ld64.lld.darwinold -arch x86_64 -objc_gc_only %s 2>&1 | FileCheck %s
22
#
33
# Test that the -objc_gc_only is rejected.
44
#

lld/test/darwin/native-and-mach-o.objtxt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s \
1+
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s \
22
# RUN: %p/Inputs/native-and-mach-o.objtxt \
33
# RUN: %p/Inputs/native-and-mach-o2.objtxt -o %t && \
44
# RUN: llvm-nm %t | FileCheck %s

lld/test/mach-o/Inputs/swift-version-1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: not ld64.lld -arch x86_64 -r %s %p/Inputs/hello-world-x86_64.yaml 2>&1 | FileCheck %s
1+
# RUN: not ld64.lld.darwinold -arch x86_64 -r %s %p/Inputs/hello-world-x86_64.yaml 2>&1 | FileCheck %s
22

33
--- !mach-o
44
arch: x86_64

lld/test/mach-o/Inputs/wrong-arch-error.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: not ld64.lld -arch x86_64 -r %s 2> %t.err
1+
# RUN: not ld64.lld.darwinold -arch x86_64 -r %s 2> %t.err
22
# RUN: FileCheck %s < %t.err
33

44
--- !mach-o

lld/test/mach-o/PIE.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s \
1+
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s \
22
# RUN: %p/Inputs/PIE.yaml -o %t && \
33
# RUN: llvm-objdump --macho --private-headers %t | FileCheck %s
44
#
5-
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s \
5+
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s \
66
# RUN: %p/Inputs/PIE.yaml -pie -o %t\
77
# RUN: && llvm-objdump --macho --private-headers %t | FileCheck %s
88
#
9-
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s \
9+
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s \
1010
# RUN: %p/Inputs/PIE.yaml -no_pie -o %t\
1111
# RUN: && llvm-objdump --macho --private-headers %t \
1212
# RUN: | FileCheck --check-prefix=CHECK_NO_PIE %s

lld/test/mach-o/align_text.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# RUN: ld64.lld -arch x86_64 -r %s -o %t -print_atoms | FileCheck %s
2-
# RUN: ld64.lld -arch x86_64 -r %t -o %t2 -print_atoms | FileCheck %s
1+
# RUN: ld64.lld.darwinold -arch x86_64 -r %s -o %t -print_atoms | FileCheck %s
2+
# RUN: ld64.lld.darwinold -arch x86_64 -r %t -o %t2 -print_atoms | FileCheck %s
33
#
44
# Test that alignment info round trips through -r
55
#

lld/test/mach-o/arm-interworking-movw.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# REQUIRES: arm
2-
# RUN: ld64.lld -arch armv7 -r -print_atoms %s -o %t | FileCheck %s
3-
# RUN: ld64.lld -arch armv7 -dylib -print_atoms %t -o %t2 \
2+
# RUN: ld64.lld.darwinold -arch armv7 -r -print_atoms %s -o %t | FileCheck %s
3+
# RUN: ld64.lld.darwinold -arch armv7 -dylib -print_atoms %t -o %t2 \
44
# RUN: %p/Inputs/armv7/libSystem.yaml -sectalign __TEXT __text 0x1000 | FileCheck %s
55
# RUN: llvm-objdump -d --macho --no-symbolic-operands %t2 | FileCheck --check-prefix=CODE %s
66
#

lld/test/mach-o/arm-interworking.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# RUN: ld64.lld -arch armv7 -r -print_atoms %s \
1+
# RUN: ld64.lld.darwinold -arch armv7 -r -print_atoms %s \
22
# RUN: %p/Inputs/arm-interworking.yaml -o %t | FileCheck %s \
3-
# RUN: && ld64.lld -arch armv7 -dylib -print_atoms \
3+
# RUN: && ld64.lld.darwinold -arch armv7 -dylib -print_atoms \
44
# RUN: %p/Inputs/armv7/libSystem.yaml %t -o %t2 | FileCheck %s \
55
# RUN: && llvm-readobj -S --section-data %t2 | FileCheck -check-prefix=CODE %s
66
#

lld/test/mach-o/arm-shims.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: ld64.lld -arch armv7 %s %p/Inputs/arm-shims.yaml \
1+
# RUN: ld64.lld.darwinold -arch armv7 %s %p/Inputs/arm-shims.yaml \
22
# RUN: -dylib %p/Inputs/armv7/libSystem.yaml -o %t
33
# RUN: llvm-readobj -S --section-data %t | FileCheck %s
44
#

lld/test/mach-o/arm-subsections-via-symbols.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: ld64.lld -arch armv7 %s -r -print_atoms -o %t | FileCheck %s
1+
# RUN: ld64.lld.darwinold -arch armv7 %s -r -print_atoms -o %t | FileCheck %s
22
#
33
# Test that assembly written without .subsections_via_symbols is parsed so
44
# that atoms are non-dead-strip and there is a layout-after references

lld/test/mach-o/arm64-reloc-negDelta32-fixup.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# RUN: ld64.lld -arch arm64 -r %s -o %t
2-
# RUN: ld64.lld -arch arm64 -r %t -o %t2
1+
# RUN: ld64.lld.darwinold -arch arm64 -r %s -o %t
2+
# RUN: ld64.lld.darwinold -arch arm64 -r %t -o %t2
33
# RUN: llvm-objdump -s --section="__eh_frame" %t | FileCheck %s
44
# RUN: llvm-objdump -s --section="__eh_frame" %t2 | FileCheck %s
55

lld/test/mach-o/arm64-relocs-errors-delta64-offset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: not ld64.lld -arch arm64 %s -r \
1+
# RUN: not ld64.lld.darwinold -arch arm64 %s -r \
22
# RUN: 2> %t.err
33
# RUN: FileCheck %s < %t.err
44

lld/test/mach-o/arm64-section-order.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# RUN: ld64.lld -arch arm64 -r -print_atoms %s -o %t
2-
# RUN: ld64.lld -arch arm64 -r -print_atoms %t -o %t2
1+
# RUN: ld64.lld.darwinold -arch arm64 -r -print_atoms %s -o %t
2+
# RUN: ld64.lld.darwinold -arch arm64 -r -print_atoms %t -o %t2
33
# RUN: llvm-objdump --section-headers %t | FileCheck %s
44
# RUN: llvm-objdump --section-headers %t2 | FileCheck %s
55

lld/test/mach-o/bind-opcodes.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: ld64.lld -arch arm64 %s %p/Inputs/hello-world-arm64.yaml -o %t
1+
# RUN: ld64.lld.darwinold -arch arm64 %s %p/Inputs/hello-world-arm64.yaml -o %t
22
# RUN: obj2yaml %t | FileCheck %s
33
#
44

lld/test/mach-o/cstring-sections.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: ld64.lld -arch x86_64 -r %s -o %t -print_atoms | FileCheck %s
1+
# RUN: ld64.lld.darwinold -arch x86_64 -r %s -o %t -print_atoms | FileCheck %s
22
#
33
# Test -keep_private_externs in -r mode.
44
#

lld/test/mach-o/data-in-code-load-command.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml && llvm-objdump --private-headers %t | FileCheck %s
2-
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static -data_in_code_info && llvm-objdump --private-headers %t | FileCheck %s
3-
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -no_data_in_code_info && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_DATA_IN_CODE_INFO
4-
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static -data_in_code_info -no_data_in_code_info && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_DATA_IN_CODE_INFO
5-
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_DATA_IN_CODE_INFO
6-
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -r && llvm-objdump --private-headers %t | FileCheck %s
7-
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -r -data_in_code_info && llvm-objdump --private-headers %t | FileCheck %s
8-
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -r -no_data_in_code_info && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_DATA_IN_CODE_INFO
1+
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml && llvm-objdump --private-headers %t | FileCheck %s
2+
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static -data_in_code_info && llvm-objdump --private-headers %t | FileCheck %s
3+
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -no_data_in_code_info && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_DATA_IN_CODE_INFO
4+
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static -data_in_code_info -no_data_in_code_info && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_DATA_IN_CODE_INFO
5+
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_DATA_IN_CODE_INFO
6+
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -r && llvm-objdump --private-headers %t | FileCheck %s
7+
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -r -data_in_code_info && llvm-objdump --private-headers %t | FileCheck %s
8+
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -r -no_data_in_code_info && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_DATA_IN_CODE_INFO
99

1010
--- !mach-o
1111
arch: x86_64

lld/test/mach-o/data-only-dylib.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: ld64.lld -arch x86_64 -dylib %s -o %t %p/Inputs/x86_64/libSystem.yaml
1+
# RUN: ld64.lld.darwinold -arch x86_64 -dylib %s -o %t %p/Inputs/x86_64/libSystem.yaml
22
# RUN: llvm-nm %t | FileCheck %s
33
#
44
# Test that a data-only dylib can be built.

0 commit comments

Comments
 (0)