[lld] 415c0cd - [lld-macho] Switch default to new Darwin backend

Jez Ng via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 1 09:30:28 PST 2021


Author: Jez Ng
Date: 2021-03-01T12:30:10-05:00
New Revision: 415c0cd698a8f0784172d19d542a3b525d1bb9b0

URL: https://github.com/llvm/llvm-project/commit/415c0cd698a8f0784172d19d542a3b525d1bb9b0
DIFF: https://github.com/llvm/llvm-project/commit/415c0cd698a8f0784172d19d542a3b525d1bb9b0.diff

LOG: [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

Added: 
    clang/test/Driver/Inputs/lld/ld64.lld.darwinold

Modified: 
    clang/lib/Driver/ToolChain.cpp
    clang/test/Driver/darwin-ld-demangle-lld.c
    clang/test/Driver/darwin-ld-platform-version-ios.c
    clang/test/Driver/darwin-ld-platform-version-macos.c
    clang/test/Driver/darwin-ld-platform-version-tvos.c
    clang/test/Driver/darwin-ld-platform-version-watchos.c
    lld/test/MachO/invalid/stub-link.s
    lld/test/MachO/lit.local.cfg
    lld/test/MachO/search-paths-darwin.test
    lld/test/MachO/syslibroot.test
    lld/test/darwin/cmdline-lto_library.objtxt
    lld/test/darwin/cmdline-objc_gc.objtxt
    lld/test/darwin/cmdline-objc_gc_compaction.objtxt
    lld/test/darwin/cmdline-objc_gc_only.objtxt
    lld/test/darwin/native-and-mach-o.objtxt
    lld/test/mach-o/Inputs/swift-version-1.yaml
    lld/test/mach-o/Inputs/wrong-arch-error.yaml
    lld/test/mach-o/PIE.yaml
    lld/test/mach-o/align_text.yaml
    lld/test/mach-o/arm-interworking-movw.yaml
    lld/test/mach-o/arm-interworking.yaml
    lld/test/mach-o/arm-shims.yaml
    lld/test/mach-o/arm-subsections-via-symbols.yaml
    lld/test/mach-o/arm64-reloc-negDelta32-fixup.yaml
    lld/test/mach-o/arm64-relocs-errors-delta64-offset.yaml
    lld/test/mach-o/arm64-section-order.yaml
    lld/test/mach-o/bind-opcodes.yaml
    lld/test/mach-o/cstring-sections.yaml
    lld/test/mach-o/data-in-code-load-command.yaml
    lld/test/mach-o/data-only-dylib.yaml
    lld/test/mach-o/dead-strip-globals.yaml
    lld/test/mach-o/debug-syms.yaml
    lld/test/mach-o/demangle.yaml
    lld/test/mach-o/dependency_info.yaml
    lld/test/mach-o/do-not-emit-unwind-fde-arm64.yaml
    lld/test/mach-o/dso_handle.yaml
    lld/test/mach-o/dylib-install-names.yaml
    lld/test/mach-o/eh-frame-relocs-arm64.yaml
    lld/test/mach-o/empty-sections.yaml
    lld/test/mach-o/error-simulator-vs-macosx.yaml
    lld/test/mach-o/exe-offsets.yaml
    lld/test/mach-o/exe-segment-overlap.yaml
    lld/test/mach-o/executable-exports.yaml
    lld/test/mach-o/export-trie-order.yaml
    lld/test/mach-o/exported_symbols_list-dylib.yaml
    lld/test/mach-o/exported_symbols_list-obj.yaml
    lld/test/mach-o/exported_symbols_list-undef.yaml
    lld/test/mach-o/fat-archive.yaml
    lld/test/mach-o/filelist.yaml
    lld/test/mach-o/flat_namespace_undef_error.yaml
    lld/test/mach-o/flat_namespace_undef_suppress.yaml
    lld/test/mach-o/force_load-dylib.yaml
    lld/test/mach-o/force_load-x86_64.yaml
    lld/test/mach-o/framework-user-paths.yaml
    lld/test/mach-o/function-starts-load-command.yaml
    lld/test/mach-o/gcc_except_tab-got-arm64.yaml
    lld/test/mach-o/got-order.yaml
    lld/test/mach-o/hello-world-arm64.yaml
    lld/test/mach-o/hello-world-armv6.yaml
    lld/test/mach-o/hello-world-armv7.yaml
    lld/test/mach-o/hello-world-x86.yaml
    lld/test/mach-o/hello-world-x86_64.yaml
    lld/test/mach-o/image-base.yaml
    lld/test/mach-o/infer-arch.yaml
    lld/test/mach-o/interposing-section.yaml
    lld/test/mach-o/keep_private_externs.yaml
    lld/test/mach-o/lazy-bind-x86_64.yaml
    lld/test/mach-o/lc_segment_filesize.yaml
    lld/test/mach-o/lib-search-paths.yaml
    lld/test/mach-o/library-order.yaml
    lld/test/mach-o/library-rescan.yaml
    lld/test/mach-o/libresolve-bizarre-root-override.yaml
    lld/test/mach-o/libresolve-multiple-syslibroots.yaml
    lld/test/mach-o/libresolve-one-syslibroot.yaml
    lld/test/mach-o/libresolve-simple.yaml
    lld/test/mach-o/libresolve-user-paths.yaml
    lld/test/mach-o/libresolve-z.yaml
    lld/test/mach-o/load-commands-size.yaml
    lld/test/mach-o/mach_header-cpusubtype.yaml
    lld/test/mach-o/mh_bundle_header.yaml
    lld/test/mach-o/mh_dylib_header.yaml
    lld/test/mach-o/objc-category-list-atom.yaml
    lld/test/mach-o/objc-image-info-host-vs-simulator.yaml
    lld/test/mach-o/objc-image-info-invalid-size.yaml
    lld/test/mach-o/objc-image-info-invalid-version.yaml
    lld/test/mach-o/objc-image-info-mismatched-swift-version.yaml
    lld/test/mach-o/objc-image-info-pass-output.yaml
    lld/test/mach-o/objc-image-info-simulator-vs-host.yaml
    lld/test/mach-o/objc-image-info-unsupported-gc.yaml
    lld/test/mach-o/objc_export_list.yaml
    lld/test/mach-o/order_file-basic.yaml
    lld/test/mach-o/parse-aliases.yaml
    lld/test/mach-o/parse-arm-relocs.yaml
    lld/test/mach-o/parse-cfstring32.yaml
    lld/test/mach-o/parse-cfstring64.yaml
    lld/test/mach-o/parse-compact-unwind32.yaml
    lld/test/mach-o/parse-compact-unwind64.yaml
    lld/test/mach-o/parse-data-in-code-armv7.yaml
    lld/test/mach-o/parse-data-in-code-x86.yaml
    lld/test/mach-o/parse-data-relocs-arm64.yaml
    lld/test/mach-o/parse-data-relocs-x86_64.yaml
    lld/test/mach-o/parse-data.yaml
    lld/test/mach-o/parse-eh-frame-relocs-x86_64.yaml
    lld/test/mach-o/parse-eh-frame-x86-anon.yaml
    lld/test/mach-o/parse-eh-frame-x86-labeled.yaml
    lld/test/mach-o/parse-eh-frame.yaml
    lld/test/mach-o/parse-function.yaml
    lld/test/mach-o/parse-initializers32.yaml
    lld/test/mach-o/parse-initializers64.yaml
    lld/test/mach-o/parse-literals-error.yaml
    lld/test/mach-o/parse-literals.yaml
    lld/test/mach-o/parse-non-lazy-pointers.yaml
    lld/test/mach-o/parse-relocs-x86.yaml
    lld/test/mach-o/parse-section-no-symbol.yaml
    lld/test/mach-o/parse-tentative-defs.yaml
    lld/test/mach-o/parse-text-relocs-arm64.yaml
    lld/test/mach-o/parse-text-relocs-x86_64.yaml
    lld/test/mach-o/parse-tlv-relocs-x86-64.yaml
    lld/test/mach-o/re-exported-dylib-ordinal.yaml
    lld/test/mach-o/rpath.yaml
    lld/test/mach-o/run-tlv-pass-x86-64.yaml
    lld/test/mach-o/sdk-version-error.yaml
    lld/test/mach-o/sectalign.yaml
    lld/test/mach-o/sectattrs.yaml
    lld/test/mach-o/sectcreate.yaml
    lld/test/mach-o/seg-protection-arm64.yaml
    lld/test/mach-o/seg-protection-x86_64.yaml
    lld/test/mach-o/source-version.yaml
    lld/test/mach-o/stack-size.yaml
    lld/test/mach-o/string-table.yaml
    lld/test/mach-o/stub-link.s
    lld/test/mach-o/subsections-via-symbols-default.yaml
    lld/test/mach-o/twolevel_namespace_undef_dynamic_lookup.yaml
    lld/test/mach-o/twolevel_namespace_undef_warning_suppress.yaml
    lld/test/mach-o/unwind-info-simple-arm64.yaml
    lld/test/mach-o/unwind-info-simple-x86_64.yaml
    lld/test/mach-o/upward-dylib-load-command.yaml
    lld/test/mach-o/upward-dylib-paths.yaml
    lld/test/mach-o/usage.yaml
    lld/test/mach-o/use-dylib.yaml
    lld/test/mach-o/use-simple-dylib.yaml
    lld/test/mach-o/version-min-load-command-object.yaml
    lld/test/mach-o/version-min-load-command.yaml
    lld/test/mach-o/write-final-sections.yaml
    lld/test/mach-o/wrong-arch-error.yaml
    lld/tools/lld/CMakeLists.txt
    lld/tools/lld/lld.cpp
    llvm/utils/gn/build/BUILD.gn
    llvm/utils/gn/secondary/lld/tools/lld/BUILD.gn

Removed: 
    clang/test/Driver/Inputs/lld/ld64.lld.darwinnew


################################################################################
diff  --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp
index f8b03b635dd7..e6a6fe2cb062 100644
--- a/clang/lib/Driver/ToolChain.cpp
+++ b/clang/lib/Driver/ToolChain.cpp
@@ -620,11 +620,11 @@ std::string ToolChain::GetLinkerPath(bool *LinkerIsLLD,
 
     std::string LinkerPath(GetProgramPath(LinkerName.c_str()));
     if (llvm::sys::fs::can_execute(LinkerPath)) {
-      // FIXME: Remove lld.darwinnew here once it's the only MachO lld.
+      // FIXME: Remove LinkerIsLLDDarwinNew once there's only one MachO lld.
       if (LinkerIsLLD)
-        *LinkerIsLLD = UseLinker == "lld" || UseLinker == "lld.darwinnew";
+        *LinkerIsLLD = UseLinker == "lld" || UseLinker == "lld.darwinold";
       if (LinkerIsLLDDarwinNew)
-        *LinkerIsLLDDarwinNew = UseLinker == "lld.darwinnew";
+        *LinkerIsLLDDarwinNew = UseLinker == "lld";
       return LinkerPath;
     }
   }

diff  --git a/clang/test/Driver/Inputs/lld/ld64.lld.darwinnew b/clang/test/Driver/Inputs/lld/ld64.lld.darwinold
similarity index 100%
rename from clang/test/Driver/Inputs/lld/ld64.lld.darwinnew
rename to clang/test/Driver/Inputs/lld/ld64.lld.darwinold

diff  --git a/clang/test/Driver/darwin-ld-demangle-lld.c b/clang/test/Driver/darwin-ld-demangle-lld.c
index 84facc8d1539..9610f6bc1016 100644
--- a/clang/test/Driver/darwin-ld-demangle-lld.c
+++ b/clang/test/Driver/darwin-ld-demangle-lld.c
@@ -1,12 +1,13 @@
 // With -fuse-ld=lld, -demangle is always passed to the linker on Darwin.
 // REQUIRES: shell
 
+// FIXME: Remove this test case when we remove the lld.darwinold backend.
 // RUN: %clang --target=x86_64-apple-darwin -### \
-// RUN:   -fuse-ld=lld -B%S/Inputs/lld -mlinker-version=0 %s 2>&1 \
+// RUN:   -fuse-ld=lld.darwinold -B%S/Inputs/lld -mlinker-version=0 %s 2>&1 \
 // RUN:   | FileCheck %s
-// FIXME: Remove ld.darwinnew once it's the default (and only) mach-o lld.
+
 // RUN: %clang --target=x86_64-apple-darwin -### \
-// RUN:   -fuse-ld=lld.darwinnew -B%S/Inputs/lld -mlinker-version=0 %s 2>&1 \
+// RUN:   -fuse-ld=lld -B%S/Inputs/lld -mlinker-version=0 %s 2>&1 \
 // RUN:   | FileCheck %s
 
 // CHECK: "-demangle"

diff  --git a/clang/test/Driver/darwin-ld-platform-version-ios.c b/clang/test/Driver/darwin-ld-platform-version-ios.c
index d03e46b5776d..bd518c315149 100644
--- a/clang/test/Driver/darwin-ld-platform-version-ios.c
+++ b/clang/test/Driver/darwin-ld-platform-version-ios.c
@@ -1,6 +1,6 @@
 // RUN: touch %t.o
 
-// RUN: %clang -target arm64-apple-ios12.3 -fuse-ld= \
+// RUN: %clang -target arm64-apple-ios12.3 -fuse-ld=lld.darwinold \
 // RUN:   -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=0 \
 // RUN:   -### %t.o 2>&1 \
 // RUN:   | FileCheck --check-prefix=LINKER-OLD %s
@@ -12,7 +12,7 @@
 // RUN:   -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=520 \
 // RUN:   -### %t.o 2>&1 \
 // RUN:   | FileCheck --check-prefix=LINKER-NEW %s
-// RUN: %clang -target arm64-apple-ios12.3 -fuse-ld=lld.darwinnew \
+// RUN: %clang -target arm64-apple-ios12.3 -fuse-ld=lld \
 // RUN:   -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=0 \
 // RUN:   -### %t.o -B%S/Inputs/lld 2>&1 \
 // RUN:   | FileCheck --check-prefix=LINKER-NEW  %s
@@ -20,7 +20,7 @@
 // RUN:   -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=520 \
 // RUN:   -### %t.o 2>&1 \
 // RUN:   | FileCheck --check-prefix=SIMUL %s
-// RUN: %clang -target x86_64-apple-ios13-simulator -fuse-ld=lld.darwinnew \
+// RUN: %clang -target x86_64-apple-ios13-simulator -fuse-ld=lld \
 // RUN:   -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=0 \
 // RUN:   -### %t.o -B%S/Inputs/lld 2>&1 \
 // RUN:   | FileCheck --check-prefix=SIMUL %s

diff  --git a/clang/test/Driver/darwin-ld-platform-version-macos.c b/clang/test/Driver/darwin-ld-platform-version-macos.c
index 1954deea7b93..5a2510acb646 100644
--- a/clang/test/Driver/darwin-ld-platform-version-macos.c
+++ b/clang/test/Driver/darwin-ld-platform-version-macos.c
@@ -1,10 +1,10 @@
 // RUN: touch %t.o
 
-// RUN: %clang -target x86_64-apple-macos10.13 -fuse-ld= \
+// RUN: %clang -target x86_64-apple-macos10.13 -fuse-ld=lld.darwinold \
 // RUN:   -isysroot %S/Inputs/MacOSX10.14.sdk -mlinker-version=0 \
 // RUN:   -### %t.o 2>&1 \
 // RUN:   | FileCheck --check-prefix=LINKER-OLD %s
-// RUN: %clang -target x86_64-apple-macos10.13 -fuse-ld=lld.darwinnew \
+// RUN: %clang -target x86_64-apple-macos10.13 -fuse-ld=lld \
 // RUN:   -isysroot %S/Inputs/MacOSX10.14.sdk -mlinker-version=0 \
 // RUN:   -### %t.o -B%S/Inputs/lld 2>&1 \
 // RUN:   | FileCheck --check-prefix=LINKER-NEW %s
@@ -21,7 +21,7 @@
 // RUN:   -isysroot %S/Inputs/MacOSX10.14.sdk -mlinker-version=400 \
 // RUN:   -### %t.o 2>&1 \
 // RUN:   | FileCheck --check-prefix=ARM64_OLD %s
-// RUN: %clang -target arm64-apple-macos10.13 -fuse-ld=lld.darwinnew \
+// RUN: %clang -target arm64-apple-macos10.13 -fuse-ld=lld \
 // RUN:   -isysroot %S/Inputs/MacOSX10.14.sdk -mlinker-version=400 \
 // RUN:   -### %t.o -B%S/Inputs/lld 2>&1 \
 // RUN:   | FileCheck --check-prefix=ARM64_NEW %s

diff  --git a/clang/test/Driver/darwin-ld-platform-version-tvos.c b/clang/test/Driver/darwin-ld-platform-version-tvos.c
index beaa46b32f6f..bf57c26bf25c 100644
--- a/clang/test/Driver/darwin-ld-platform-version-tvos.c
+++ b/clang/test/Driver/darwin-ld-platform-version-tvos.c
@@ -1,6 +1,6 @@
 // RUN: touch %t.o
 
-// RUN: %clang -target arm64-apple-tvos12.3 -fuse-ld= \
+// RUN: %clang -target arm64-apple-tvos12.3 -fuse-ld=lld.darwinold \
 // RUN:   -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=0 \
 // RUN:   -### %t.o 2>&1 \
 // RUN:   | FileCheck --check-prefix=LINKER-OLD %s
@@ -8,7 +8,7 @@
 // RUN:   -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=400 \
 // RUN:   -### %t.o 2>&1 \
 // RUN:   | FileCheck --check-prefix=LINKER-OLD %s
-// RUN: %clang -target arm64-apple-tvos12.3 -fuse-ld=lld.darwinnew \
+// RUN: %clang -target arm64-apple-tvos12.3 -fuse-ld=lld \
 // RUN:   -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=0 \
 // RUN:   -### %t.o -B%S/Inputs/lld 2>&1 \
 // RUN:   | FileCheck --check-prefix=LINKER-NEW %s

diff  --git a/clang/test/Driver/darwin-ld-platform-version-watchos.c b/clang/test/Driver/darwin-ld-platform-version-watchos.c
index ab03fefce696..639c937d6be5 100644
--- a/clang/test/Driver/darwin-ld-platform-version-watchos.c
+++ b/clang/test/Driver/darwin-ld-platform-version-watchos.c
@@ -1,6 +1,6 @@
 // RUN: touch %t.o
 
-// RUN: %clang -target arm64_32-apple-watchos5.2 -fuse-ld= \
+// RUN: %clang -target arm64_32-apple-watchos5.2 -fuse-ld=lld.darwinold \
 // RUN:   -isysroot %S/Inputs/WatchOS6.0.sdk -mlinker-version=0 \
 // RUN:   -### %t.o 2>&1 \
 // RUN:   | FileCheck --check-prefix=LINKER-OLD %s
@@ -8,7 +8,7 @@
 // RUN:   -isysroot %S/Inputs/WatchOS6.0.sdk -mlinker-version=400 \
 // RUN:   -### %t.o 2>&1 \
 // RUN:   | FileCheck --check-prefix=LINKER-OLD %s
-// RUN: %clang -target arm64_32-apple-watchos5.2 -fuse-ld=lld.darwinnew \
+// RUN: %clang -target arm64_32-apple-watchos5.2 -fuse-ld=lld \
 // RUN:   -isysroot %S/Inputs/WatchOS6.0.sdk -mlinker-version=0 \
 // RUN:   -### %t.o -B%S/Inputs/lld 2>&1 \
 // RUN:   | FileCheck --check-prefix=LINKER-NEW %s

diff  --git a/lld/test/MachO/invalid/stub-link.s b/lld/test/MachO/invalid/stub-link.s
index 486773244dab..7dfa319fcf3c 100644
--- a/lld/test/MachO/invalid/stub-link.s
+++ b/lld/test/MachO/invalid/stub-link.s
@@ -6,7 +6,7 @@
 # RUN: mkdir -p %t
 #
 # RUN: llvm-mc -filetype obj -triple x86_64-apple-ios %s -o %t/test.o
-# RUN: not lld -flavor darwinnew -o %t/test -syslibroot %S/../Inputs/iPhoneSimulator.sdk -lSystem %t/test.o 2>&1 | FileCheck %s
+# RUN: not ld64.lld -o %t/test -syslibroot %S/../Inputs/iPhoneSimulator.sdk -lSystem %t/test.o 2>&1 | FileCheck %s
 
 # CHECK-DAG: error: undefined symbol: __cache_handle_memory_pressure_event
 # CHECK-DAG: error: undefined symbol: _from_non_reexported_tapi_dylib

diff  --git a/lld/test/MachO/lit.local.cfg b/lld/test/MachO/lit.local.cfg
index 64d28802068b..939435385aa7 100644
--- a/lld/test/MachO/lit.local.cfg
+++ b/lld/test/MachO/lit.local.cfg
@@ -2,7 +2,7 @@
 
 import os
 
-lld = ('lld -flavor darwinnew -syslibroot ' +
+lld = ('ld64.lld -syslibroot ' +
     os.path.join(config.test_source_root, "MachO", "Inputs", "MacOSX.sdk"))
 config.substitutions.append(('%lld', lld + ' -fatal_warnings'))
 config.substitutions.append(('%no_fatal_warnings_lld', lld))

diff  --git a/lld/test/MachO/search-paths-darwin.test b/lld/test/MachO/search-paths-darwin.test
index 85b7e30671b4..4e1123109a55 100644
--- a/lld/test/MachO/search-paths-darwin.test
+++ b/lld/test/MachO/search-paths-darwin.test
@@ -3,7 +3,7 @@ REQUIRES: darwin
 
 RUN: mkdir -p %t1 %t2
 
-RUN: lld -flavor darwinnew -arch x86_64 -v -L%t1 -F%t2 2>&1 | FileCheck -DLDIR=%t1 -DFDIR=%t2 %s
+RUN: ld64.lld -arch x86_64 -v -L%t1 -F%t2 2>&1 | FileCheck -DLDIR=%t1 -DFDIR=%t2 %s
 CHECK:      Library search paths:
 CHECK-NEXT: [[LDIR]]
 CHECK-NEXT: /usr/lib
@@ -13,7 +13,7 @@ CHECK-NEXT: [[FDIR]]
 CHECK-NEXT: /Library/Frameworks
 CHECK-NEXT: /System/Library/Frameworks
 
-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
+RUN: ld64.lld -arch x86_64 -v -L%t1 -F%t2 -Z 2>&1 | FileCheck -DLDIR=%t1 -DFDIR=%t2 --check-prefix=CHECK_Z %s
 CHECK_Z:      Library search paths:
 CHECK_Z-NEXT: [[LDIR]]
 CHECK_Z-NEXT: Framework search paths:

diff  --git a/lld/test/MachO/syslibroot.test b/lld/test/MachO/syslibroot.test
index ade8652820b1..42099a96a81c 100644
--- a/lld/test/MachO/syslibroot.test
+++ b/lld/test/MachO/syslibroot.test
@@ -1,56 +1,56 @@
 # Ensure that a nonexistent path is ignored with a syslibroot
 
-RUN: lld -flavor darwinnew -v -syslibroot /var/empty | FileCheck %s -check-prefix CHECK-NONEXISTENT-SYSLIBROOT
+RUN: ld64.lld -v -syslibroot /var/empty | FileCheck %s -check-prefix CHECK-NONEXISTENT-SYSLIBROOT
 
 CHECK-NONEXISTENT-SYSLIBROOT: Library search paths:
 CHECK-NONEXISTENT-SYSLIBROOT-NEXT: Framework search paths:
 
 RUN: mkdir -p %t/usr/lib
-RUN: lld -flavor darwinnew -v -syslibroot %t 2>&1 | FileCheck %s -check-prefix CHECK-SYSLIBROOT -DROOT=%t
+RUN: ld64.lld -v -syslibroot %t 2>&1 | FileCheck %s -check-prefix CHECK-SYSLIBROOT -DROOT=%t
 
 CHECK-SYSLIBROOT-NOT: directory not found{{.*}}usr/local/lib
 CHECK-SYSLIBROOT: Library search paths:
 CHECK-SYSLIBROOT-NEXT: [[ROOT]]/usr/lib
 
 RUN: mkdir -p %t/Library/libxml2-development
-RUN: lld -flavor darwinnew -v -syslibroot %t -L /Library/libxml2-development | FileCheck %s -check-prefix CHECK-ABSOLUTE-PATH-REROOTED -DROOT=%t
+RUN: ld64.lld -v -syslibroot %t -L /Library/libxml2-development | FileCheck %s -check-prefix CHECK-ABSOLUTE-PATH-REROOTED -DROOT=%t
 
 CHECK-ABSOLUTE-PATH-REROOTED: Library search paths:
 CHECK-ABSOLUTE-PATH-REROOTED: [[ROOT]]/Library/libxml2-development
 CHECK-ABSOLUTE-PATH-REROOTED: [[ROOT]]/usr/lib
 
-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
+RUN: ld64.lld -v -syslibroot %t -L %t/Library/libxml2-development | FileCheck %s -check-prefix CHECK-PATH-WITHOUT-REROOT -DPATH=%t/Library/libxml2-development
 CHECK-PATH-WITHOUT-REROOT:      Library search paths:
 CHECK-PATH-WITHOUT-REROOT-NEXT: [[PATH]]
 
 RUN: mkdir -p %t.2/usr/lib
-RUN: lld -flavor darwinnew -v -syslibroot %t -syslibroot %t.2 | FileCheck %s -check-prefix CHECK-SYSLIBROOT-MATRIX -DROOT=%t
+RUN: ld64.lld -v -syslibroot %t -syslibroot %t.2 | FileCheck %s -check-prefix CHECK-SYSLIBROOT-MATRIX -DROOT=%t
 
 CHECK-SYSLIBROOT-MATRIX: Library search paths:
 CHECK-SYSLIBROOT-MATRIX: [[ROOT]]/usr/lib
 CHECK-SYSLIBROOT-MATRIX: [[ROOT]].2/usr/lib
 
-RUN: lld -flavor darwinnew -v -syslibroot %t -syslibroot %t.2 -syslibroot / | FileCheck %s -check-prefix CHECK-SYSLIBROOT-IGNORED -DROOT=%t
+RUN: ld64.lld -v -syslibroot %t -syslibroot %t.2 -syslibroot / | FileCheck %s -check-prefix CHECK-SYSLIBROOT-IGNORED -DROOT=%t
 
 CHECK-SYSLIBROOT-IGNORED: Library search paths:
 CHECK-SYSLIBROOT-IGNORED-NOT: [[ROOT]]/usr/lib
 CHECK-SYSLIBROOT-IGNORED-NOT: [[ROOT]].2/usr/lib
 
 RUN: mkdir -p %t/System/Library/Frameworks
-RUN: lld -flavor darwinnew -v -syslibroot %t | FileCheck %s -check-prefix CHECK-SYSLIBROOT-FRAMEWORK -DROOT=%t
+RUN: ld64.lld -v -syslibroot %t | FileCheck %s -check-prefix CHECK-SYSLIBROOT-FRAMEWORK -DROOT=%t
 
 CHECK-SYSLIBROOT-FRAMEWORK: Framework search paths:
 CHECK-SYSLIBROOT-FRAMEWORK: [[ROOT]]/System/Library/Frameworks
 
 RUN: mkdir -p %t/Library/Frameworks
 RUN: mkdir -p %t.2/Library/Frameworks
-RUN: lld -flavor darwinnew -v -syslibroot %t -syslibroot %t.2 -F /Library/Frameworks | FileCheck %s -check-prefix CHECK-SYSLIBROOT-FRAMEWORK-MATRIX -DROOT=%t
+RUN: ld64.lld -v -syslibroot %t -syslibroot %t.2 -F /Library/Frameworks | FileCheck %s -check-prefix CHECK-SYSLIBROOT-FRAMEWORK-MATRIX -DROOT=%t
 
 CHECK-SYSLIBROOT-FRAMEWORK-MATRIX: Framework search paths:
 CHECK-SYSLIBROOT-FRAMEWORK-MATRIX: [[ROOT]]/Library/Frameworks
 CHECK-SYSLIBROOT-FRAMEWORK-MATRIX: [[ROOT]].2/Library/Frameworks
 
-RUN: lld -flavor darwinnew -v -syslibroot %t -syslibroot %t.2 -syslibroot / -F /Library/Frameworks | FileCheck %s -check-prefix CHECK-SYSLIBROOT-FRAMEWORK-IGNORED -DROOT=%t
+RUN: ld64.lld -v -syslibroot %t -syslibroot %t.2 -syslibroot / -F /Library/Frameworks | FileCheck %s -check-prefix CHECK-SYSLIBROOT-FRAMEWORK-IGNORED -DROOT=%t
 
 CHECK-SYSLIBROOT-FRAMEWORK-IGNORED: Framework search paths:
 CHECK-SYSLIBROOT-FRAMEWORK-IGNORED-NOT: [[ROOT]]/Library/Frameworks

diff  --git a/lld/test/darwin/cmdline-lto_library.objtxt b/lld/test/darwin/cmdline-lto_library.objtxt
index 6b91235560b4..48226ec81361 100644
--- a/lld/test/darwin/cmdline-lto_library.objtxt
+++ b/lld/test/darwin/cmdline-lto_library.objtxt
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -lto_library %t -print-atoms -r %s 2>&1 | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 -lto_library %t -print-atoms -r %s 2>&1 | FileCheck %s
 #
 # Test that the -lto_library option does not result in an error.
 #

diff  --git a/lld/test/darwin/cmdline-objc_gc.objtxt b/lld/test/darwin/cmdline-objc_gc.objtxt
index 4fff925234a0..f6db8e06ef9a 100644
--- a/lld/test/darwin/cmdline-objc_gc.objtxt
+++ b/lld/test/darwin/cmdline-objc_gc.objtxt
@@ -1,4 +1,4 @@
-# RUN: not ld64.lld -arch x86_64 -objc_gc %s 2>&1 | FileCheck %s
+# RUN: not ld64.lld.darwinold -arch x86_64 -objc_gc %s 2>&1 | FileCheck %s
 #
 # Test that the -objc_gc is rejected.
 #

diff  --git a/lld/test/darwin/cmdline-objc_gc_compaction.objtxt b/lld/test/darwin/cmdline-objc_gc_compaction.objtxt
index 7cb7e8277368..47620b9b39a1 100644
--- a/lld/test/darwin/cmdline-objc_gc_compaction.objtxt
+++ b/lld/test/darwin/cmdline-objc_gc_compaction.objtxt
@@ -1,4 +1,4 @@
-# RUN: not ld64.lld -arch x86_64 -objc_gc_compaction %s 2>&1 | FileCheck %s
+# RUN: not ld64.lld.darwinold -arch x86_64 -objc_gc_compaction %s 2>&1 | FileCheck %s
 #
 # Test that the -objc_gc_compaction is rejected.
 #

diff  --git a/lld/test/darwin/cmdline-objc_gc_only.objtxt b/lld/test/darwin/cmdline-objc_gc_only.objtxt
index eb9f13145915..4c5f1b338bd6 100644
--- a/lld/test/darwin/cmdline-objc_gc_only.objtxt
+++ b/lld/test/darwin/cmdline-objc_gc_only.objtxt
@@ -1,4 +1,4 @@
-# RUN: not ld64.lld -arch x86_64 -objc_gc_only %s 2>&1 | FileCheck %s
+# RUN: not ld64.lld.darwinold -arch x86_64 -objc_gc_only %s 2>&1 | FileCheck %s
 #
 # Test that the -objc_gc_only is rejected.
 #

diff  --git a/lld/test/darwin/native-and-mach-o.objtxt b/lld/test/darwin/native-and-mach-o.objtxt
index b4c0a4066a19..41a9ef64dddb 100644
--- a/lld/test/darwin/native-and-mach-o.objtxt
+++ b/lld/test/darwin/native-and-mach-o.objtxt
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s \
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s \
 # RUN: %p/Inputs/native-and-mach-o.objtxt  \
 # RUN: %p/Inputs/native-and-mach-o2.objtxt -o %t  && \
 # RUN: llvm-nm %t | FileCheck %s

diff  --git a/lld/test/mach-o/Inputs/swift-version-1.yaml b/lld/test/mach-o/Inputs/swift-version-1.yaml
index b555e4782843..5c59af7f78b6 100644
--- a/lld/test/mach-o/Inputs/swift-version-1.yaml
+++ b/lld/test/mach-o/Inputs/swift-version-1.yaml
@@ -1,4 +1,4 @@
-# RUN: not ld64.lld -arch x86_64 -r %s %p/Inputs/hello-world-x86_64.yaml 2>&1 | FileCheck %s
+# RUN: not ld64.lld.darwinold -arch x86_64 -r %s %p/Inputs/hello-world-x86_64.yaml 2>&1 | FileCheck %s
 
 --- !mach-o
 arch:            x86_64

diff  --git a/lld/test/mach-o/Inputs/wrong-arch-error.yaml b/lld/test/mach-o/Inputs/wrong-arch-error.yaml
index 39ef3c1a9500..714ce9f1631d 100644
--- a/lld/test/mach-o/Inputs/wrong-arch-error.yaml
+++ b/lld/test/mach-o/Inputs/wrong-arch-error.yaml
@@ -1,4 +1,4 @@
-# RUN: not ld64.lld -arch x86_64 -r %s 2> %t.err
+# RUN: not ld64.lld.darwinold -arch x86_64 -r %s 2> %t.err
 # RUN: FileCheck %s < %t.err
 
 --- !mach-o

diff  --git a/lld/test/mach-o/PIE.yaml b/lld/test/mach-o/PIE.yaml
index ce6487c860b0..0195f5059cdf 100644
--- a/lld/test/mach-o/PIE.yaml
+++ b/lld/test/mach-o/PIE.yaml
@@ -1,12 +1,12 @@
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s \
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s \
 # RUN: %p/Inputs/PIE.yaml -o %t  && \
 # RUN: llvm-objdump --macho --private-headers %t | FileCheck %s
 #
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s \
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s \
 # RUN: %p/Inputs/PIE.yaml -pie -o %t\
 # RUN:  &&  llvm-objdump --macho --private-headers %t | FileCheck %s
 #
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s \
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s \
 # RUN: %p/Inputs/PIE.yaml -no_pie -o %t\
 # RUN:  &&  llvm-objdump --macho --private-headers %t \
 # RUN:  | FileCheck --check-prefix=CHECK_NO_PIE %s

diff  --git a/lld/test/mach-o/align_text.yaml b/lld/test/mach-o/align_text.yaml
index d633a8eb95df..6278ee251636 100644
--- a/lld/test/mach-o/align_text.yaml
+++ b/lld/test/mach-o/align_text.yaml
@@ -1,5 +1,5 @@
-# RUN: ld64.lld -arch x86_64 -r %s -o %t -print_atoms | FileCheck %s
-# RUN: ld64.lld -arch x86_64 -r %t -o %t2 -print_atoms | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 -r %s -o %t -print_atoms | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 -r %t -o %t2 -print_atoms | FileCheck %s
 #
 # Test that alignment info round trips through -r
 #

diff  --git a/lld/test/mach-o/arm-interworking-movw.yaml b/lld/test/mach-o/arm-interworking-movw.yaml
index 6bad3a9ea98b..3f61fafd1943 100644
--- a/lld/test/mach-o/arm-interworking-movw.yaml
+++ b/lld/test/mach-o/arm-interworking-movw.yaml
@@ -1,6 +1,6 @@
 # REQUIRES: arm
-# RUN: ld64.lld -arch armv7 -r -print_atoms %s -o %t  | FileCheck %s
-# RUN: ld64.lld -arch armv7 -dylib -print_atoms %t -o %t2 \
+# RUN: ld64.lld.darwinold -arch armv7 -r -print_atoms %s -o %t  | FileCheck %s
+# RUN: ld64.lld.darwinold -arch armv7 -dylib -print_atoms %t -o %t2 \
 # RUN:     %p/Inputs/armv7/libSystem.yaml -sectalign __TEXT __text 0x1000  | FileCheck %s
 # RUN: llvm-objdump -d --macho --no-symbolic-operands %t2 | FileCheck --check-prefix=CODE %s
 #

diff  --git a/lld/test/mach-o/arm-interworking.yaml b/lld/test/mach-o/arm-interworking.yaml
index f58bff2f3d9e..4196c12d0943 100644
--- a/lld/test/mach-o/arm-interworking.yaml
+++ b/lld/test/mach-o/arm-interworking.yaml
@@ -1,6 +1,6 @@
-# RUN: ld64.lld -arch armv7 -r -print_atoms %s \
+# RUN: ld64.lld.darwinold -arch armv7 -r -print_atoms %s \
 # RUN: %p/Inputs/arm-interworking.yaml -o %t  | FileCheck %s \
-# RUN: && ld64.lld -arch armv7 -dylib -print_atoms \
+# RUN: && ld64.lld.darwinold -arch armv7 -dylib -print_atoms \
 # RUN:         %p/Inputs/armv7/libSystem.yaml %t -o %t2  | FileCheck %s \
 # RUN: && llvm-readobj -S --section-data %t2 | FileCheck -check-prefix=CODE %s
 #

diff  --git a/lld/test/mach-o/arm-shims.yaml b/lld/test/mach-o/arm-shims.yaml
index e4e35283095e..7c4f04677f1c 100644
--- a/lld/test/mach-o/arm-shims.yaml
+++ b/lld/test/mach-o/arm-shims.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch armv7 %s %p/Inputs/arm-shims.yaml \
+# RUN: ld64.lld.darwinold -arch armv7 %s %p/Inputs/arm-shims.yaml \
 # RUN: -dylib %p/Inputs/armv7/libSystem.yaml -o %t
 # RUN: llvm-readobj -S --section-data %t | FileCheck %s
 #

diff  --git a/lld/test/mach-o/arm-subsections-via-symbols.yaml b/lld/test/mach-o/arm-subsections-via-symbols.yaml
index 63e23da9f71e..96346e845c9a 100644
--- a/lld/test/mach-o/arm-subsections-via-symbols.yaml
+++ b/lld/test/mach-o/arm-subsections-via-symbols.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch armv7 %s -r -print_atoms -o %t | FileCheck %s
+# RUN: ld64.lld.darwinold -arch armv7 %s -r -print_atoms -o %t | FileCheck %s
 #
 # Test that assembly written without .subsections_via_symbols is parsed so
 # that atoms are non-dead-strip and there is a layout-after references

diff  --git a/lld/test/mach-o/arm64-reloc-negDelta32-fixup.yaml b/lld/test/mach-o/arm64-reloc-negDelta32-fixup.yaml
index b512bb755b3d..02200908d7ca 100644
--- a/lld/test/mach-o/arm64-reloc-negDelta32-fixup.yaml
+++ b/lld/test/mach-o/arm64-reloc-negDelta32-fixup.yaml
@@ -1,5 +1,5 @@
-# RUN: ld64.lld -arch arm64 -r %s -o %t
-# RUN: ld64.lld -arch arm64 -r %t -o %t2
+# RUN: ld64.lld.darwinold -arch arm64 -r %s -o %t
+# RUN: ld64.lld.darwinold -arch arm64 -r %t -o %t2
 # RUN: llvm-objdump -s --section="__eh_frame" %t | FileCheck %s
 # RUN: llvm-objdump -s --section="__eh_frame" %t2 | FileCheck %s
 

diff  --git a/lld/test/mach-o/arm64-relocs-errors-delta64-offset.yaml b/lld/test/mach-o/arm64-relocs-errors-delta64-offset.yaml
index 01a3e1bb6fc6..d0f7389a4cbe 100644
--- a/lld/test/mach-o/arm64-relocs-errors-delta64-offset.yaml
+++ b/lld/test/mach-o/arm64-relocs-errors-delta64-offset.yaml
@@ -1,4 +1,4 @@
-# RUN: not ld64.lld -arch arm64 %s -r \
+# RUN: not ld64.lld.darwinold -arch arm64 %s -r \
 # RUN: 2> %t.err
 # RUN: FileCheck %s < %t.err
 

diff  --git a/lld/test/mach-o/arm64-section-order.yaml b/lld/test/mach-o/arm64-section-order.yaml
index 6e88d6f1a429..e4174b64f67c 100644
--- a/lld/test/mach-o/arm64-section-order.yaml
+++ b/lld/test/mach-o/arm64-section-order.yaml
@@ -1,5 +1,5 @@
-# RUN: ld64.lld -arch arm64 -r -print_atoms %s -o %t
-# RUN: ld64.lld -arch arm64 -r -print_atoms %t -o %t2
+# RUN: ld64.lld.darwinold -arch arm64 -r -print_atoms %s -o %t
+# RUN: ld64.lld.darwinold -arch arm64 -r -print_atoms %t -o %t2
 # RUN: llvm-objdump --section-headers %t | FileCheck %s
 # RUN: llvm-objdump --section-headers %t2 | FileCheck %s
 

diff  --git a/lld/test/mach-o/bind-opcodes.yaml b/lld/test/mach-o/bind-opcodes.yaml
index 2b9496fbe5d7..4a33b54cb4e1 100644
--- a/lld/test/mach-o/bind-opcodes.yaml
+++ b/lld/test/mach-o/bind-opcodes.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch arm64 %s %p/Inputs/hello-world-arm64.yaml -o %t
+# RUN: ld64.lld.darwinold -arch arm64 %s %p/Inputs/hello-world-arm64.yaml -o %t
 # RUN: obj2yaml %t | FileCheck %s
 #
 

diff  --git a/lld/test/mach-o/cstring-sections.yaml b/lld/test/mach-o/cstring-sections.yaml
index 2936ca9fdbfe..251df8e3587e 100644
--- a/lld/test/mach-o/cstring-sections.yaml
+++ b/lld/test/mach-o/cstring-sections.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -r  %s -o %t -print_atoms | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 -r  %s -o %t -print_atoms | FileCheck %s
 #
 # Test -keep_private_externs in -r mode.
 #

diff  --git a/lld/test/mach-o/data-in-code-load-command.yaml b/lld/test/mach-o/data-in-code-load-command.yaml
index a99026b11d21..e2131783619a 100644
--- a/lld/test/mach-o/data-in-code-load-command.yaml
+++ b/lld/test/mach-o/data-in-code-load-command.yaml
@@ -1,11 +1,11 @@
-# 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
-# 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
-# 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
-# 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
-# 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
-# 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
-# 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
-# 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
+# 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
+# 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
+# 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
+# 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
+# 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
+# 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
+# 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
+# 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
 
 --- !mach-o
 arch:            x86_64

diff  --git a/lld/test/mach-o/data-only-dylib.yaml b/lld/test/mach-o/data-only-dylib.yaml
index a163609225b2..f865755e3c52 100644
--- a/lld/test/mach-o/data-only-dylib.yaml
+++ b/lld/test/mach-o/data-only-dylib.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -dylib %s -o %t %p/Inputs/x86_64/libSystem.yaml
+# RUN: ld64.lld.darwinold -arch x86_64 -dylib %s -o %t %p/Inputs/x86_64/libSystem.yaml
 # RUN: llvm-nm %t | FileCheck %s
 #
 # Test that a data-only dylib can be built.

diff  --git a/lld/test/mach-o/dead-strip-globals.yaml b/lld/test/mach-o/dead-strip-globals.yaml
index 42edd19f62ce..cacc44f4b93c 100644
--- a/lld/test/mach-o/dead-strip-globals.yaml
+++ b/lld/test/mach-o/dead-strip-globals.yaml
@@ -1,8 +1,8 @@
-# RUN: ld64.lld -arch x86_64 -dead_strip -export_dynamic %s -dylib %p/Inputs/x86_64/libSystem.yaml -o %t.dylib -print_atoms | FileCheck -check-prefix=CHECK1 %s
-# RUN: ld64.lld -arch x86_64 -export_dynamic -dead_strip %s -dylib %p/Inputs/x86_64/libSystem.yaml -o %t.dylib -print_atoms | FileCheck -check-prefix=CHECK1 %s
-# RUN: ld64.lld -arch x86_64 -dead_strip %s -dylib %p/Inputs/x86_64/libSystem.yaml -o %t2.dylib -print_atoms | FileCheck -check-prefix=CHECK2 %s
+# RUN: ld64.lld.darwinold -arch x86_64 -dead_strip -export_dynamic %s -dylib %p/Inputs/x86_64/libSystem.yaml -o %t.dylib -print_atoms | FileCheck -check-prefix=CHECK1 %s
+# RUN: ld64.lld.darwinold -arch x86_64 -export_dynamic -dead_strip %s -dylib %p/Inputs/x86_64/libSystem.yaml -o %t.dylib -print_atoms | FileCheck -check-prefix=CHECK1 %s
+# RUN: ld64.lld.darwinold -arch x86_64 -dead_strip %s -dylib %p/Inputs/x86_64/libSystem.yaml -o %t2.dylib -print_atoms | FileCheck -check-prefix=CHECK2 %s
 
-# RUN: ld64.lld -arch x86_64 -r %s -dylib %p/Inputs/x86_64/libSystem.yaml -o %t3.o
+# RUN: ld64.lld.darwinold -arch x86_64 -r %s -dylib %p/Inputs/x86_64/libSystem.yaml -o %t3.o
 # RUN: llvm-nm -m %t3.o | FileCheck -check-prefix=RELOCATABLE_SYMBOLS %s
 
 #

diff  --git a/lld/test/mach-o/debug-syms.yaml b/lld/test/mach-o/debug-syms.yaml
index cd61c879b0b5..54ea4ddd5114 100644
--- a/lld/test/mach-o/debug-syms.yaml
+++ b/lld/test/mach-o/debug-syms.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -o %t %s -dylib %p/Inputs/x86_64/libSystem.yaml && \
+# RUN: ld64.lld.darwinold -arch x86_64 -o %t %s -dylib %p/Inputs/x86_64/libSystem.yaml && \
 # RUN:   llvm-nm -no-sort -debug-syms %t | FileCheck %s
 
 # CHECK:      0000000000000000 - 00 0000    SO /Users/lhames/Projects/lld/lld-svn-tot/scratch/

diff  --git a/lld/test/mach-o/demangle.yaml b/lld/test/mach-o/demangle.yaml
index cdd5e8adb621..2f1cba527f26 100644
--- a/lld/test/mach-o/demangle.yaml
+++ b/lld/test/mach-o/demangle.yaml
@@ -1,10 +1,10 @@
 # REQUIRES: system-linker-mach-o
 #
-# RUN: not ld64.lld -arch x86_64 -macosx_version_min 10.8 %s  \
+# RUN: not ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s  \
 # RUN:     -dylib -o %t %p/Inputs/x86_64/libSystem.yaml  2> %t.err
 # RUN: FileCheck %s < %t.err
 #
-# RUN: not ld64.lld -arch x86_64 -macosx_version_min 10.8 %s \
+# RUN: not ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s \
 # RUN:     -dylib -o %t %p/Inputs/x86_64/libSystem.yaml -demangle 2> %t.err2
 # RUN: FileCheck %s --check-prefix=DCHECK < %t.err2
 #

diff  --git a/lld/test/mach-o/dependency_info.yaml b/lld/test/mach-o/dependency_info.yaml
index 06b269ae1680..1195c9e91967 100644
--- a/lld/test/mach-o/dependency_info.yaml
+++ b/lld/test/mach-o/dependency_info.yaml
@@ -1,6 +1,6 @@
 # Test -dependency_info option
 #
-# RUN: ld64.lld -arch x86_64 -test_file_usage  \
+# RUN: ld64.lld.darwinold -arch x86_64 -test_file_usage  \
 # RUN:        -dependency_info %t.info \
 # RUN:        -path_exists /System/Library/Frameworks \
 # RUN:        -path_exists /System/Library/Frameworks/Foo.framework/Foo \

diff  --git a/lld/test/mach-o/do-not-emit-unwind-fde-arm64.yaml b/lld/test/mach-o/do-not-emit-unwind-fde-arm64.yaml
index 5ad2815b9cd9..0cb3655d49a1 100644
--- a/lld/test/mach-o/do-not-emit-unwind-fde-arm64.yaml
+++ b/lld/test/mach-o/do-not-emit-unwind-fde-arm64.yaml
@@ -1,5 +1,5 @@
-# RUN: ld64.lld -arch arm64 -r -print_atoms %s -o %t | FileCheck %s
-# RUN: ld64.lld -arch arm64 -r -print_atoms %t -o %t2 | FileCheck %s
+# RUN: ld64.lld.darwinold -arch arm64 -r -print_atoms %s -o %t | FileCheck %s
+# RUN: ld64.lld.darwinold -arch arm64 -r -print_atoms %t -o %t2 | FileCheck %s
 # RUN: llvm-objdump -r -s --section="__eh_frame" --macho %t | FileCheck --check-prefix=CODE %s
 # RUN: llvm-objdump -r -s --section="__eh_frame" --macho %t2 | FileCheck --check-prefix=CODE %s
 

diff  --git a/lld/test/mach-o/dso_handle.yaml b/lld/test/mach-o/dso_handle.yaml
index 6c74371a0b3f..f35f8b1cd6f8 100644
--- a/lld/test/mach-o/dso_handle.yaml
+++ b/lld/test/mach-o/dso_handle.yaml
@@ -1,13 +1,13 @@
-# RUN: ld64.lld -arch x86_64  %s  %p/Inputs/x86_64/libSystem.yaml -o %t1
+# RUN: ld64.lld.darwinold -arch x86_64  %s  %p/Inputs/x86_64/libSystem.yaml -o %t1
 # RUN: llvm-nm -m -n %t1 | FileCheck %s
 #
-# RUN: ld64.lld -arch x86_64  %s %p/Inputs/x86_64/libSystem.yaml -dead_strip -o %t2
+# RUN: ld64.lld.darwinold -arch x86_64  %s %p/Inputs/x86_64/libSystem.yaml -dead_strip -o %t2
 # RUN: llvm-nm -m -n %t2 | FileCheck %s
 #
-# RUN: ld64.lld -arch x86_64  %s %p/Inputs/x86_64/libSystem.yaml -dylib -o %t3
+# RUN: ld64.lld.darwinold -arch x86_64  %s %p/Inputs/x86_64/libSystem.yaml -dylib -o %t3
 # RUN: llvm-nm -m -n %t3 | FileCheck %s
 #
-# RUN: ld64.lld -arch x86_64  %s %p/Inputs/x86_64/libSystem.yaml -bundle -o %t4
+# RUN: ld64.lld.darwinold -arch x86_64  %s %p/Inputs/x86_64/libSystem.yaml -bundle -o %t4
 # RUN: llvm-nm -m -n %t4 | FileCheck %s
 #
 # Test that ___dso_handle symbol is available for executables, bundles, and dylibs

diff  --git a/lld/test/mach-o/dylib-install-names.yaml b/lld/test/mach-o/dylib-install-names.yaml
index 20b7780c073a..869b19bdab17 100644
--- a/lld/test/mach-o/dylib-install-names.yaml
+++ b/lld/test/mach-o/dylib-install-names.yaml
@@ -1,23 +1,23 @@
 # Check we accept -install_name correctly:
-# RUN: ld64.lld -arch x86_64 -install_name libwibble.dylib -dylib \
+# RUN: ld64.lld.darwinold -arch x86_64 -install_name libwibble.dylib -dylib \
 # RUN:     -compatibility_version 2.0 -current_version 5.3 \
 # RUN:     %p/Inputs/x86_64/libSystem.yaml %s -o %t.dylib
 # RUN: llvm-objdump --private-headers %t.dylib | FileCheck %s --check-prefix=CHECK-BINARY-WRITE
 
 # Check we read LC_ID_DYLIB correctly:
-# RUN: ld64.lld -arch x86_64 %p/Inputs/use-dylib-install-names.yaml \
+# RUN: ld64.lld.darwinold -arch x86_64 %p/Inputs/use-dylib-install-names.yaml \
 # RUN:      %p/Inputs/x86_64/libSystem.yaml %t.dylib -dylib -o %t2.dylib
 # RUN: llvm-objdump --private-headers %t2.dylib | FileCheck %s --check-prefix=CHECK-BINARY-READ
 
 # Check we default the install-name to the output file:
-# RUN: ld64.lld -arch x86_64 -dylib %s -o libwibble.dylib \
+# RUN: ld64.lld.darwinold -arch x86_64 -dylib %s -o libwibble.dylib \
 # RUN:     -compatibility_version 2.0 -current_version 5.3 \
 # RUN:     %p/Inputs/x86_64/libSystem.yaml
 # RUN: llvm-objdump --private-headers libwibble.dylib | FileCheck %s --check-prefix=CHECK-BINARY-WRITE
 # RUN: rm -f libwibble.dylib
 
 # Check -single_module does nothing
-# RUN: ld64.lld -arch x86_64 -dylib %s -install_name libwibble.dylib \
+# RUN: ld64.lld.darwinold -arch x86_64 -dylib %s -install_name libwibble.dylib \
 # RUN:     -compatibility_version 2.0 -current_version 5.3 \
 # RUN:     -single_module -o %t2.dylib %p/Inputs/x86_64/libSystem.yaml
 # RUN: llvm-objdump --private-headers %t2.dylib | FileCheck %s --check-prefix=CHECK-BINARY-WRITE

diff  --git a/lld/test/mach-o/eh-frame-relocs-arm64.yaml b/lld/test/mach-o/eh-frame-relocs-arm64.yaml
index e669aaf8109b..3d7245e5d114 100644
--- a/lld/test/mach-o/eh-frame-relocs-arm64.yaml
+++ b/lld/test/mach-o/eh-frame-relocs-arm64.yaml
@@ -1,5 +1,5 @@
-# RUN: ld64.lld -arch arm64 -r -print_atoms %s -o %t | FileCheck %s
-# RUN: ld64.lld -arch arm64 -r -print_atoms %t -o %t2 | FileCheck %s
+# RUN: ld64.lld.darwinold -arch arm64 -r -print_atoms %s -o %t | FileCheck %s
+# RUN: ld64.lld.darwinold -arch arm64 -r -print_atoms %t -o %t2 | FileCheck %s
 # RUN: llvm-objdump -r -s --section="__eh_frame" --macho %t | FileCheck --check-prefix=CODE %s
 # RUN: llvm-objdump -r -s --section="__eh_frame" --macho %t2 | FileCheck --check-prefix=CODE %s
 

diff  --git a/lld/test/mach-o/empty-sections.yaml b/lld/test/mach-o/empty-sections.yaml
index ca6b150b1a46..83cd97aeac39 100644
--- a/lld/test/mach-o/empty-sections.yaml
+++ b/lld/test/mach-o/empty-sections.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -r %s -o %t
+# RUN: ld64.lld.darwinold -arch x86_64 -r %s -o %t
 #
 # Test that writing empty mach-o sections does not segfault the linker.
 #

diff  --git a/lld/test/mach-o/error-simulator-vs-macosx.yaml b/lld/test/mach-o/error-simulator-vs-macosx.yaml
index fcf1774d760a..94b73d6c5334 100644
--- a/lld/test/mach-o/error-simulator-vs-macosx.yaml
+++ b/lld/test/mach-o/error-simulator-vs-macosx.yaml
@@ -1,5 +1,5 @@
-# RUN: ld64.lld -arch i386 -macosx_version_min 10.8 %s %p/Inputs/hello-world-x86.yaml -o %t && llvm-nm -m %t | FileCheck %s
-# RUN: not ld64.lld -arch i386 -ios_simulator_version_min 5.0 %s %p/Inputs/hello-world-x86.yaml -o %t 2>&1 | FileCheck %s --check-prefix=ERROR
+# RUN: ld64.lld.darwinold -arch i386 -macosx_version_min 10.8 %s %p/Inputs/hello-world-x86.yaml -o %t && llvm-nm -m %t | FileCheck %s
+# RUN: not ld64.lld.darwinold -arch i386 -ios_simulator_version_min 5.0 %s %p/Inputs/hello-world-x86.yaml -o %t 2>&1 | FileCheck %s --check-prefix=ERROR
 #
 # Test that i386 can link with a macos version but gives an error with a simulator version.
 #

diff  --git a/lld/test/mach-o/exe-offsets.yaml b/lld/test/mach-o/exe-offsets.yaml
index b653f9da377e..65025febf4e4 100644
--- a/lld/test/mach-o/exe-offsets.yaml
+++ b/lld/test/mach-o/exe-offsets.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 %s -o %t -e start %p/Inputs/x86_64/libSystem.yaml
+# RUN: ld64.lld.darwinold -arch x86_64 %s -o %t -e start %p/Inputs/x86_64/libSystem.yaml
 # RUN: llvm-readobj --sections %t | FileCheck %s
 
 # Make sure data gets put at offset

diff  --git a/lld/test/mach-o/exe-segment-overlap.yaml b/lld/test/mach-o/exe-segment-overlap.yaml
index ac99859d4eba..f1bf67bd0908 100644
--- a/lld/test/mach-o/exe-segment-overlap.yaml
+++ b/lld/test/mach-o/exe-segment-overlap.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 %s -o %t %p/Inputs/x86_64/libSystem.yaml
+# RUN: ld64.lld.darwinold -arch x86_64 %s -o %t %p/Inputs/x86_64/libSystem.yaml
 # RUN: llvm-readobj --sections --section-data %t | FileCheck %s
 
 --- !native

diff  --git a/lld/test/mach-o/executable-exports.yaml b/lld/test/mach-o/executable-exports.yaml
index cd5c1f83bad9..8f0f3146e421 100644
--- a/lld/test/mach-o/executable-exports.yaml
+++ b/lld/test/mach-o/executable-exports.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 \
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 \
 # RUN:      %s %p/Inputs/x86_64/libSystem.yaml -o %t  && \
 # RUN: llvm-objdump --macho --exports-trie %t | FileCheck %s
 #

diff  --git a/lld/test/mach-o/export-trie-order.yaml b/lld/test/mach-o/export-trie-order.yaml
index 70c2bc1bdf16..e8819e00b400 100644
--- a/lld/test/mach-o/export-trie-order.yaml
+++ b/lld/test/mach-o/export-trie-order.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch i386 %s %p/Inputs/hello-world-x86.yaml -o %t
+# RUN: ld64.lld.darwinold -arch i386 %s %p/Inputs/hello-world-x86.yaml -o %t
 # RUN: llvm-objdump --macho --exports-trie %t | FileCheck %s
 #
 # Test that the export trie is emitted in order.

diff  --git a/lld/test/mach-o/exported_symbols_list-dylib.yaml b/lld/test/mach-o/exported_symbols_list-dylib.yaml
index 860d26848fea..1c417d860341 100644
--- a/lld/test/mach-o/exported_symbols_list-dylib.yaml
+++ b/lld/test/mach-o/exported_symbols_list-dylib.yaml
@@ -1,19 +1,19 @@
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 -dylib \
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 -dylib \
 # RUN:      %s %p/Inputs/x86_64/libSystem.yaml -o %t \
 # RUN:      -exported_symbols_list %p/Inputs/exported_symbols_list.exp && \
 # RUN: llvm-nm -m %t | FileCheck %s
 #
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 -dylib \
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 -dylib \
 # RUN:      %s %p/Inputs/x86_64/libSystem.yaml -o %t2 \
 # RUN:      -exported_symbol _foo -exported_symbol _b  && \
 # RUN: llvm-nm -m %t2 | FileCheck %s
 #
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 -dylib \
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 -dylib \
 # RUN:      %s %p/Inputs/x86_64/libSystem.yaml -o %t3 \
 # RUN:      -unexported_symbol _bar -unexported_symbol _a  && \
 # RUN: llvm-nm -m %t3 | FileCheck %s
 #
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 -dylib \
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 -dylib \
 # RUN:      %s %p/Inputs/x86_64/libSystem.yaml -dead_strip -o %t \
 # RUN:      -exported_symbols_list %p/Inputs/exported_symbols_list.exp && \
 # RUN: llvm-nm -m %t | FileCheck -check-prefix=CHECK_DEAD %s

diff  --git a/lld/test/mach-o/exported_symbols_list-obj.yaml b/lld/test/mach-o/exported_symbols_list-obj.yaml
index cc0f75cdc2f7..420b9cc60317 100644
--- a/lld/test/mach-o/exported_symbols_list-obj.yaml
+++ b/lld/test/mach-o/exported_symbols_list-obj.yaml
@@ -1,11 +1,11 @@
-# RUN: ld64.lld -arch x86_64 -r  %s -o %t -exported_symbol _bar \
+# RUN: ld64.lld.darwinold -arch x86_64 -r  %s -o %t -exported_symbol _bar \
 # RUN:    && llvm-nm -m %t | FileCheck %s
 #
-# RUN: ld64.lld -arch x86_64 -r  %s -o %t2 -keep_private_externs \
+# RUN: ld64.lld.darwinold -arch x86_64 -r  %s -o %t2 -keep_private_externs \
 # RUN:      -exported_symbol _bar && \
 # RUN: llvm-nm -m %t2 | FileCheck -check-prefix=CHECK_KPE %s
 #
-# RUN: not ld64.lld -arch x86_64 -r  %s -o %t3  \
+# RUN: not ld64.lld.darwinold -arch x86_64 -r  %s -o %t3  \
 # RUN:      -exported_symbol _foo 2> %t4
 
 # Test -exported_symbols_list properly changes visibility in -r mode.

diff  --git a/lld/test/mach-o/exported_symbols_list-undef.yaml b/lld/test/mach-o/exported_symbols_list-undef.yaml
index 6aca11b61d2a..85480af7fdae 100644
--- a/lld/test/mach-o/exported_symbols_list-undef.yaml
+++ b/lld/test/mach-o/exported_symbols_list-undef.yaml
@@ -1,4 +1,4 @@
-# RUN: not ld64.lld -arch x86_64 -macosx_version_min 10.8 -dylib \
+# RUN: not ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 -dylib \
 # RUN:      %s %p/Inputs/x86_64/libSystem.yaml -o %t -exported_symbol _foobar 2> %t2
 #
 # Test -exported_symbol fails if exported symbol not found.

diff  --git a/lld/test/mach-o/fat-archive.yaml b/lld/test/mach-o/fat-archive.yaml
index a36c25bca7e1..33631ed3b1f3 100644
--- a/lld/test/mach-o/fat-archive.yaml
+++ b/lld/test/mach-o/fat-archive.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t \
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t \
 # RUN:    -L %p/Inputs -lfoo %p/Inputs/x86_64/libSystem.yaml
 # RUN: llvm-nm -m -n %t | FileCheck %s
 #

diff  --git a/lld/test/mach-o/filelist.yaml b/lld/test/mach-o/filelist.yaml
index 85c04f570722..e2ffa9fce7fe 100644
--- a/lld/test/mach-o/filelist.yaml
+++ b/lld/test/mach-o/filelist.yaml
@@ -1,11 +1,11 @@
-# RUN: ld64.lld -test_file_usage  \
+# RUN: ld64.lld.darwinold -test_file_usage  \
 # RUN:    -filelist %p/Inputs/full.filelist \
 # RUN:        -path_exists /foo/bar/a.o \
 # RUN:        -path_exists /foo/bar/b.o \
 # RUN:        -path_exists /foo/x.a \
 # RUN: 2>&1 | FileCheck %s
 #
-# RUN: ld64.lld -test_file_usage -t \
+# RUN: ld64.lld.darwinold -test_file_usage -t \
 # RUN:    -filelist %p/Inputs/partial.filelist,/foo \
 # RUN:        -path_exists /foo/bar/a.o \
 # RUN:        -path_exists /foo/bar/b.o \

diff  --git a/lld/test/mach-o/flat_namespace_undef_error.yaml b/lld/test/mach-o/flat_namespace_undef_error.yaml
index 6d4c38ec1cca..004ab3b8add3 100644
--- a/lld/test/mach-o/flat_namespace_undef_error.yaml
+++ b/lld/test/mach-o/flat_namespace_undef_error.yaml
@@ -1,4 +1,4 @@
-# RUN: not ld64.lld -arch x86_64 -macosx_version_min 10.9 -flat_namespace -undefined error %s -o %t %p/Inputs/x86_64/libSystem.yaml 2>&1 | FileCheck %s
+# RUN: not ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.9 -flat_namespace -undefined error %s -o %t %p/Inputs/x86_64/libSystem.yaml 2>&1 | FileCheck %s
 
 --- !native
 defined-atoms:

diff  --git a/lld/test/mach-o/flat_namespace_undef_suppress.yaml b/lld/test/mach-o/flat_namespace_undef_suppress.yaml
index 8fdcfb9c30db..9ad0db86332d 100644
--- a/lld/test/mach-o/flat_namespace_undef_suppress.yaml
+++ b/lld/test/mach-o/flat_namespace_undef_suppress.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.9 -flat_namespace -undefined suppress %s -o %t %p/Inputs/x86_64/libSystem.yaml
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.9 -flat_namespace -undefined suppress %s -o %t %p/Inputs/x86_64/libSystem.yaml
 #
 # Sanity check '-flat_namespace -undefined suppress'.
 # This should pass without error, even though '_bar' is undefined.

diff  --git a/lld/test/mach-o/force_load-dylib.yaml b/lld/test/mach-o/force_load-dylib.yaml
index 4e27b0220c34..fb40aa9b67b5 100644
--- a/lld/test/mach-o/force_load-dylib.yaml
+++ b/lld/test/mach-o/force_load-dylib.yaml
@@ -1,6 +1,6 @@
-# RUN: ld64.lld -arch x86_64 -dylib %p/Inputs/bar.yaml \
+# RUN: ld64.lld.darwinold -arch x86_64 -dylib %p/Inputs/bar.yaml \
 # RUN:     -install_name /usr/lib/libbar.dylib %p/Inputs/x86_64/libSystem.yaml -o %t1.dylib
-# RUN: ld64.lld -arch x86_64 -dylib %s -all_load %t1.dylib \
+# RUN: ld64.lld.darwinold -arch x86_64 -dylib %s -all_load %t1.dylib \
 # RUN:      -install_name /usr/lib/libfoo.dylib %p/Inputs/x86_64/libSystem.yaml -o %t
 # RUN: llvm-nm -m %t | FileCheck %s
 #

diff  --git a/lld/test/mach-o/force_load-x86_64.yaml b/lld/test/mach-o/force_load-x86_64.yaml
index 7ea2a7851833..295217c8b3c1 100644
--- a/lld/test/mach-o/force_load-x86_64.yaml
+++ b/lld/test/mach-o/force_load-x86_64.yaml
@@ -1,8 +1,8 @@
-# RUN: ld64.lld -arch x86_64  %s %p/Inputs/x86_64/libSystem.yaml \
+# RUN: ld64.lld.darwinold -arch x86_64  %s %p/Inputs/x86_64/libSystem.yaml \
 # RUN:      %p/Inputs/libfoo.a %p/Inputs/libbar.a -o %t1
 # RUN: llvm-nm -m -n %t1 | FileCheck %s
 #
-# RUN: ld64.lld -arch x86_64  %s %p/Inputs/x86_64/libSystem.yaml \
+# RUN: ld64.lld.darwinold -arch x86_64  %s %p/Inputs/x86_64/libSystem.yaml \
 # RUN:      -force_load %p/Inputs/libfoo.a %p/Inputs/libbar.a -o %t2
 # RUN: llvm-nm -m -n %t2 | FileCheck --check-prefix=CHECKF %s
 #

diff  --git a/lld/test/mach-o/framework-user-paths.yaml b/lld/test/mach-o/framework-user-paths.yaml
index bb4d82250723..a96cfed7ab75 100644
--- a/lld/test/mach-o/framework-user-paths.yaml
+++ b/lld/test/mach-o/framework-user-paths.yaml
@@ -5,7 +5,7 @@
 #   /opt/Frameworks should not be found in SDK
 #   /System/Library/Frameworks is implicit and should be in SDK
 #
-# RUN: ld64.lld -arch x86_64 -r -test_file_usage -v \
+# RUN: ld64.lld.darwinold -arch x86_64 -r -test_file_usage -v \
 # RUN:        -path_exists myFrameworks \
 # RUN:        -path_exists myFrameworks/my.framework/my \
 # RUN:        -path_exists /opt/Frameworks \

diff  --git a/lld/test/mach-o/function-starts-load-command.yaml b/lld/test/mach-o/function-starts-load-command.yaml
index df1f9cf67eda..cb558ad688e2 100644
--- a/lld/test/mach-o/function-starts-load-command.yaml
+++ b/lld/test/mach-o/function-starts-load-command.yaml
@@ -1,8 +1,8 @@
-# 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
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static -function_starts && llvm-objdump --private-headers %t | FileCheck %s
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -no_function_starts && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_FUNCTION_STARTS
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static -function_starts -no_function_starts && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_FUNCTION_STARTS
-# 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_FUNCTION_STARTS
+# 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
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static -function_starts && llvm-objdump --private-headers %t | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -no_function_starts && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_FUNCTION_STARTS
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static -function_starts -no_function_starts && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_FUNCTION_STARTS
+# 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_FUNCTION_STARTS
 
 --- !mach-o
 arch:            x86_64

diff  --git a/lld/test/mach-o/gcc_except_tab-got-arm64.yaml b/lld/test/mach-o/gcc_except_tab-got-arm64.yaml
index d453e56084e3..caccf4f2fe14 100644
--- a/lld/test/mach-o/gcc_except_tab-got-arm64.yaml
+++ b/lld/test/mach-o/gcc_except_tab-got-arm64.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch arm64 %s \
+# RUN: ld64.lld.darwinold -arch arm64 %s \
 # RUN: -dylib %p/Inputs/arm64/libSystem.yaml -o %t
 # RUN: llvm-objdump --section-headers %t | FileCheck %s
 

diff  --git a/lld/test/mach-o/got-order.yaml b/lld/test/mach-o/got-order.yaml
index 4e2e7f3f8164..5ebb86042245 100644
--- a/lld/test/mach-o/got-order.yaml
+++ b/lld/test/mach-o/got-order.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64  %s %p/Inputs/got-order.yaml \
+# RUN: ld64.lld.darwinold -arch x86_64  %s %p/Inputs/got-order.yaml \
 # RUN: %p/Inputs/got-order2.yaml -o %t %p/Inputs/x86_64/libSystem.yaml
 # RUN: llvm-objdump --macho --bind %t | FileCheck %s
 #

diff  --git a/lld/test/mach-o/hello-world-arm64.yaml b/lld/test/mach-o/hello-world-arm64.yaml
index 3dee661bc32a..c2e232233dc6 100644
--- a/lld/test/mach-o/hello-world-arm64.yaml
+++ b/lld/test/mach-o/hello-world-arm64.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch arm64 %s %p/Inputs/hello-world-arm64.yaml -o %t
+# RUN: ld64.lld.darwinold -arch arm64 %s %p/Inputs/hello-world-arm64.yaml -o %t
 # RUN: llvm-nm -m -n %t | FileCheck %s
 # RUN: llvm-objdump --private-headers %t | FileCheck %s --check-prefix=CHECK-PRIVATE-HEADER
 #

diff  --git a/lld/test/mach-o/hello-world-armv6.yaml b/lld/test/mach-o/hello-world-armv6.yaml
index b14b775baaf7..4004c963da89 100644
--- a/lld/test/mach-o/hello-world-armv6.yaml
+++ b/lld/test/mach-o/hello-world-armv6.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch armv6 %s %p/Inputs/hello-world-armv6.yaml -o %t
+# RUN: ld64.lld.darwinold -arch armv6 %s %p/Inputs/hello-world-armv6.yaml -o %t
 # RUN: llvm-nm -m %t | FileCheck %s
 #
 # Test that armv6 (arm) hello-world can be linked into a mach-o executable

diff  --git a/lld/test/mach-o/hello-world-armv7.yaml b/lld/test/mach-o/hello-world-armv7.yaml
index 28a96af0a882..0407e924aa5b 100644
--- a/lld/test/mach-o/hello-world-armv7.yaml
+++ b/lld/test/mach-o/hello-world-armv7.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch armv7 %s %p/Inputs/hello-world-armv7.yaml -o %t
+# RUN: ld64.lld.darwinold -arch armv7 %s %p/Inputs/hello-world-armv7.yaml -o %t
 # RUN: llvm-nm -m -n %t | FileCheck %s
 #
 # Test that armv7 (thumb) hello-world can be linked into a mach-o executable

diff  --git a/lld/test/mach-o/hello-world-x86.yaml b/lld/test/mach-o/hello-world-x86.yaml
index 7a0cfdc909f0..5c3bc6731cd4 100644
--- a/lld/test/mach-o/hello-world-x86.yaml
+++ b/lld/test/mach-o/hello-world-x86.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch i386 %s %p/Inputs/hello-world-x86.yaml -o %t
+# RUN: ld64.lld.darwinold -arch i386 %s %p/Inputs/hello-world-x86.yaml -o %t
 # RUN: llvm-nm -m %t | FileCheck %s
 #
 # Test that i386 hello-world can be linked into a mach-o executable

diff  --git a/lld/test/mach-o/hello-world-x86_64.yaml b/lld/test/mach-o/hello-world-x86_64.yaml
index 9df969d6baf7..c49565244a19 100644
--- a/lld/test/mach-o/hello-world-x86_64.yaml
+++ b/lld/test/mach-o/hello-world-x86_64.yaml
@@ -1,8 +1,8 @@
-# RUN: ld64.lld -arch x86_64  %s %p/Inputs/hello-world-x86_64.yaml \
+# RUN: ld64.lld.darwinold -arch x86_64  %s %p/Inputs/hello-world-x86_64.yaml \
 # RUN: -o %t
 # RUN: llvm-nm -m -n %t | FileCheck %s
 #
-# RUN: ld64.lld -arch x86_64  %s %p/Inputs/hello-world-x86_64.yaml \
+# RUN: ld64.lld.darwinold -arch x86_64  %s %p/Inputs/hello-world-x86_64.yaml \
 # RUN: -dead_strip -o %t2
 # RUN: llvm-nm -m -n %t2 | FileCheck %s
 #

diff  --git a/lld/test/mach-o/image-base.yaml b/lld/test/mach-o/image-base.yaml
index c184e1c3e103..c56eed199e5d 100644
--- a/lld/test/mach-o/image-base.yaml
+++ b/lld/test/mach-o/image-base.yaml
@@ -1,10 +1,10 @@
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.9 %s -o %t -image_base 31415926000 %p/Inputs/x86_64/libSystem.yaml
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.9 %s -o %t -image_base 31415926000 %p/Inputs/x86_64/libSystem.yaml
 # RUN: llvm-readobj --macho-segment %t | FileCheck %s
-# RUN: not ld64.lld -arch x86_64 -image_base 0x31415926530 %s >/dev/null 2> %t
+# RUN: not ld64.lld.darwinold -arch x86_64 -image_base 0x31415926530 %s >/dev/null 2> %t
 # RUN: FileCheck < %t %s --check-prefix=CHECK-ERROR-MISPAGED
-# RUN: not ld64.lld -arch x86_64 -image_base 1000 %s >/dev/null 2> %t
+# RUN: not ld64.lld.darwinold -arch x86_64 -image_base 1000 %s >/dev/null 2> %t
 # RUN: FileCheck < %t %s --check-prefix=CHECK-ERROR-OVERLAP
-# RUN: not ld64.lld -arch x86_64 -image_base hithere %s >/dev/null 2> %t
+# RUN: not ld64.lld.darwinold -arch x86_64 -image_base hithere %s >/dev/null 2> %t
 # RUN: FileCheck < %t %s --check-prefix=CHECK-ERROR-NOTHEX
 
 --- !native

diff  --git a/lld/test/mach-o/infer-arch.yaml b/lld/test/mach-o/infer-arch.yaml
index 2dbf124ee4e6..a66d17bc58df 100644
--- a/lld/test/mach-o/infer-arch.yaml
+++ b/lld/test/mach-o/infer-arch.yaml
@@ -1,5 +1,5 @@
-# RUN: ld64.lld -arch i386 -macosx_version_min 10.8 %s -r -o %t \
-# RUN: && ld64.lld -r %t -o %t2 -print_atoms | FileCheck %s
+# RUN: ld64.lld.darwinold -arch i386 -macosx_version_min 10.8 %s -r -o %t \
+# RUN: && ld64.lld.darwinold -r %t -o %t2 -print_atoms | FileCheck %s
 #
 # Test linker can detect architecture without -arch option.
 #

diff  --git a/lld/test/mach-o/interposing-section.yaml b/lld/test/mach-o/interposing-section.yaml
index aea66b73e34d..340ea8cc4b71 100644
--- a/lld/test/mach-o/interposing-section.yaml
+++ b/lld/test/mach-o/interposing-section.yaml
@@ -1,8 +1,8 @@
-# RUN: ld64.lld -arch x86_64  %s %p/Inputs/interposing-section.yaml \
+# RUN: ld64.lld.darwinold -arch x86_64  %s %p/Inputs/interposing-section.yaml \
 # RUN: -dylib -o %t %p/Inputs/x86_64/libSystem.yaml
 # RUN: llvm-objdump --private-headers %t | FileCheck %s
 #
-# RUN: ld64.lld -arch x86_64  %s -r -o %t1
+# RUN: ld64.lld.darwinold -arch x86_64  %s -r -o %t1
 # RUN: llvm-objdump --private-headers %t1 | FileCheck %s
 #
 # Test that interposing section is preserved by linker.

diff  --git a/lld/test/mach-o/keep_private_externs.yaml b/lld/test/mach-o/keep_private_externs.yaml
index fdee3d4bf043..b8f0e4f7a065 100644
--- a/lld/test/mach-o/keep_private_externs.yaml
+++ b/lld/test/mach-o/keep_private_externs.yaml
@@ -1,7 +1,7 @@
-# RUN: ld64.lld -arch x86_64 -r  %s -o %t \
+# RUN: ld64.lld.darwinold -arch x86_64 -r  %s -o %t \
 # RUN:    && llvm-nm -m %t | FileCheck %s
 #
-# RUN: ld64.lld -arch x86_64 -r  %s -o %t2 -keep_private_externs \
+# RUN: ld64.lld.darwinold -arch x86_64 -r  %s -o %t2 -keep_private_externs \
 # RUN:    && llvm-nm -m %t2 | FileCheck -check-prefix=CHECK_KPE %s
 #
 # Test -keep_private_externs in -r mode.

diff  --git a/lld/test/mach-o/lazy-bind-x86_64.yaml b/lld/test/mach-o/lazy-bind-x86_64.yaml
index 50438fd467d1..3bad4c2ad83c 100644
--- a/lld/test/mach-o/lazy-bind-x86_64.yaml
+++ b/lld/test/mach-o/lazy-bind-x86_64.yaml
@@ -1,6 +1,6 @@
 # REQUIRES: x86
 
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s \
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s \
 # RUN: %p/Inputs/lazy-bind-x86_64.yaml  %p/Inputs/lazy-bind-x86_64-2.yaml \
 # RUN: %p/Inputs/lazy-bind-x86_64-3.yaml -o %t  \
 # RUN:   %p/Inputs/x86_64/libSystem.yaml

diff  --git a/lld/test/mach-o/lc_segment_filesize.yaml b/lld/test/mach-o/lc_segment_filesize.yaml
index fb9703c7ffbe..fea5008adbc5 100644
--- a/lld/test/mach-o/lc_segment_filesize.yaml
+++ b/lld/test/mach-o/lc_segment_filesize.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -r -o %t %s && llvm-objdump --private-headers %t | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 -r -o %t %s && llvm-objdump --private-headers %t | FileCheck %s
 
 # CHECK: filesize 19
 

diff  --git a/lld/test/mach-o/lib-search-paths.yaml b/lld/test/mach-o/lib-search-paths.yaml
index 68998e03f4f2..29c5e62ce429 100644
--- a/lld/test/mach-o/lib-search-paths.yaml
+++ b/lld/test/mach-o/lib-search-paths.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 %s -syslibroot %p/Inputs/lib-search-paths -lmyshared -lmystatic -lfile.o -r -print_atoms 2>&1  | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 %s -syslibroot %p/Inputs/lib-search-paths -lmyshared -lmystatic -lfile.o -r -print_atoms 2>&1  | FileCheck %s
 
 --- !native
 undefined-atoms:

diff  --git a/lld/test/mach-o/library-order.yaml b/lld/test/mach-o/library-order.yaml
index 6e091fb9aa83..02d31c578a4b 100644
--- a/lld/test/mach-o/library-order.yaml
+++ b/lld/test/mach-o/library-order.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 %p/Inputs/libfoo.a %s -o %t \
+# RUN: ld64.lld.darwinold -arch x86_64 %p/Inputs/libfoo.a %s -o %t \
 # RUN:    %p/Inputs/x86_64/libSystem.yaml
 # RUN: llvm-nm -m -n %t | FileCheck %s
 #

diff  --git a/lld/test/mach-o/library-rescan.yaml b/lld/test/mach-o/library-rescan.yaml
index a09f35259e44..138a696fe5ff 100644
--- a/lld/test/mach-o/library-rescan.yaml
+++ b/lld/test/mach-o/library-rescan.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 %p/Inputs/libfoo.a %p/Inputs/libbar.a \
+# RUN: ld64.lld.darwinold -arch x86_64 %p/Inputs/libfoo.a %p/Inputs/libbar.a \
 # RUN:    %s -o %t  %p/Inputs/x86_64/libSystem.yaml
 # RUN: llvm-nm -m -n %t | FileCheck %s
 #

diff  --git a/lld/test/mach-o/libresolve-bizarre-root-override.yaml b/lld/test/mach-o/libresolve-bizarre-root-override.yaml
index 1c346808022c..0fda09a9b8d8 100644
--- a/lld/test/mach-o/libresolve-bizarre-root-override.yaml
+++ b/lld/test/mach-o/libresolve-bizarre-root-override.yaml
@@ -1,4 +1,4 @@
-# RUN: not ld64.lld -test_file_usage -v \
+# RUN: not ld64.lld.darwinold -test_file_usage -v \
 # RUN:        -path_exists /usr/lib \
 # RUN:        -path_exists /Applications/MySDK/usr/local/lib \
 # RUN:        -path_exists /Applications/MySDK/usr/lib \

diff  --git a/lld/test/mach-o/libresolve-multiple-syslibroots.yaml b/lld/test/mach-o/libresolve-multiple-syslibroots.yaml
index bc8e96462c2f..66627056afd3 100644
--- a/lld/test/mach-o/libresolve-multiple-syslibroots.yaml
+++ b/lld/test/mach-o/libresolve-multiple-syslibroots.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -test_file_usage -v \
+# RUN: ld64.lld.darwinold -test_file_usage -v \
 # RUN:        -path_exists /usr/lib \
 # RUN:        -path_exists /Applications/MyFirstSDK/usr/local/lib \
 # RUN:        -path_exists /Applications/MySecondSDK/usr/local/lib \

diff  --git a/lld/test/mach-o/libresolve-one-syslibroot.yaml b/lld/test/mach-o/libresolve-one-syslibroot.yaml
index 8e28ab4d302a..7ca2670a7277 100644
--- a/lld/test/mach-o/libresolve-one-syslibroot.yaml
+++ b/lld/test/mach-o/libresolve-one-syslibroot.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -test_file_usage -v \
+# RUN: ld64.lld.darwinold -test_file_usage -v \
 # RUN:        -path_exists /usr/lib \
 # RUN:        -path_exists /Applications/MySDK/usr/local/lib \
 # RUN:        -path_exists /Applications/MySDK/usr/local/lib/libSystem.a \

diff  --git a/lld/test/mach-o/libresolve-simple.yaml b/lld/test/mach-o/libresolve-simple.yaml
index 965099122d44..00e35734ebde 100644
--- a/lld/test/mach-o/libresolve-simple.yaml
+++ b/lld/test/mach-o/libresolve-simple.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -r -test_file_usage -v \
+# RUN: ld64.lld.darwinold -arch x86_64 -r -test_file_usage -v \
 # RUN:        -path_exists /usr/lib \
 # RUN:        -path_exists /usr/local/lib \
 # RUN:        -path_exists /usr/lib/libSystem.dylib \

diff  --git a/lld/test/mach-o/libresolve-user-paths.yaml b/lld/test/mach-o/libresolve-user-paths.yaml
index b50703d821d6..3fbb205eba5f 100644
--- a/lld/test/mach-o/libresolve-user-paths.yaml
+++ b/lld/test/mach-o/libresolve-user-paths.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -r -test_file_usage -v \
+# RUN: ld64.lld.darwinold -arch x86_64 -r -test_file_usage -v \
 # RUN:        -path_exists hasFoo \
 # RUN:        -path_exists hasFoo/libFoo.dylib \
 # RUN:        -path_exists /hasBar \

diff  --git a/lld/test/mach-o/libresolve-z.yaml b/lld/test/mach-o/libresolve-z.yaml
index 509f80b525dc..aaf98ebec46b 100644
--- a/lld/test/mach-o/libresolve-z.yaml
+++ b/lld/test/mach-o/libresolve-z.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -r -test_file_usage -v \
+# RUN: ld64.lld.darwinold -arch x86_64 -r -test_file_usage -v \
 # RUN:        -path_exists /usr/lib \
 # RUN:        -path_exists /usr/local/lib \
 # RUN:        -path_exists /usr/lib/libSystem.dylib \

diff  --git a/lld/test/mach-o/load-commands-size.yaml b/lld/test/mach-o/load-commands-size.yaml
index d1b4dd396f4a..25314d7eb4ba 100644
--- a/lld/test/mach-o/load-commands-size.yaml
+++ b/lld/test/mach-o/load-commands-size.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 %s -o %t -dylib \
+# RUN: ld64.lld.darwinold -arch x86_64 %s -o %t -dylib \
 # RUN: -macosx_version_min 10.10 -sdk_version 10.10 \
 # RUN: -install_name /usr/lib/foo.dylib \
 # RUN: %p/Inputs/x86_64/libSystem.yaml && \

diff  --git a/lld/test/mach-o/mach_header-cpusubtype.yaml b/lld/test/mach-o/mach_header-cpusubtype.yaml
index b11305833ee0..7c97e4063e2d 100644
--- a/lld/test/mach-o/mach_header-cpusubtype.yaml
+++ b/lld/test/mach-o/mach_header-cpusubtype.yaml
@@ -1,6 +1,6 @@
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.4 %s %p/Inputs/hello-world-x86_64.yaml -o %t && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_LIB64
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.5 %s %p/Inputs/hello-world-x86_64.yaml -o %t && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=LIB64
-# RUN: ld64.lld -arch x86_64 -dylib -macosx_version_min 10.5 %s %p/Inputs/hello-world-x86_64.yaml -o %t && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=DYLIB
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.4 %s %p/Inputs/hello-world-x86_64.yaml -o %t && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_LIB64
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.5 %s %p/Inputs/hello-world-x86_64.yaml -o %t && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=LIB64
+# RUN: ld64.lld.darwinold -arch x86_64 -dylib -macosx_version_min 10.5 %s %p/Inputs/hello-world-x86_64.yaml -o %t && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=DYLIB
 
 --- !mach-o
 arch:            x86_64

diff  --git a/lld/test/mach-o/mh_bundle_header.yaml b/lld/test/mach-o/mh_bundle_header.yaml
index 33944a4be882..3db78b103eab 100644
--- a/lld/test/mach-o/mh_bundle_header.yaml
+++ b/lld/test/mach-o/mh_bundle_header.yaml
@@ -1,5 +1,5 @@
-# RUN: ld64.lld -arch x86_64  %s -bundle -o %t %p/Inputs/x86_64/libSystem.yaml && llvm-nm -m -n %t | FileCheck %s
-# RUN: ld64.lld -arch x86_64  %s -bundle -dead_strip -o %t %p/Inputs/x86_64/libSystem.yaml && llvm-nm -m -n %t | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64  %s -bundle -o %t %p/Inputs/x86_64/libSystem.yaml && llvm-nm -m -n %t | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64  %s -bundle -dead_strip -o %t %p/Inputs/x86_64/libSystem.yaml && llvm-nm -m -n %t | FileCheck %s
 #
 # Test that __mh_bundle_header symbol is available for bundles
 #

diff  --git a/lld/test/mach-o/mh_dylib_header.yaml b/lld/test/mach-o/mh_dylib_header.yaml
index 27d34c44ad18..ce03d3b3c487 100644
--- a/lld/test/mach-o/mh_dylib_header.yaml
+++ b/lld/test/mach-o/mh_dylib_header.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64  %s -dylib -o %t %p/Inputs/x86_64/libSystem.yaml
+# RUN: ld64.lld.darwinold -arch x86_64  %s -dylib -o %t %p/Inputs/x86_64/libSystem.yaml
 # RUN: llvm-nm -m -n %t | FileCheck %s
 #
 # Test that __mh_dylib_header symbol is available for dylibs

diff  --git a/lld/test/mach-o/objc-category-list-atom.yaml b/lld/test/mach-o/objc-category-list-atom.yaml
index 4e6cd847840e..cf4d4966903a 100644
--- a/lld/test/mach-o/objc-category-list-atom.yaml
+++ b/lld/test/mach-o/objc-category-list-atom.yaml
@@ -1,5 +1,5 @@
-# RUN: ld64.lld -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s
-# RUN: ld64.lld -arch x86_64 -r -print_atoms %t -o %t2 | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 -r -print_atoms %t -o %t2 | FileCheck %s
 
 
 --- !mach-o

diff  --git a/lld/test/mach-o/objc-image-info-host-vs-simulator.yaml b/lld/test/mach-o/objc-image-info-host-vs-simulator.yaml
index 38f251beb4ac..06913009936b 100644
--- a/lld/test/mach-o/objc-image-info-host-vs-simulator.yaml
+++ b/lld/test/mach-o/objc-image-info-host-vs-simulator.yaml
@@ -1,4 +1,4 @@
-# RUN: not ld64.lld -arch x86_64 -r %s 2>&1 | FileCheck %s
+# RUN: not ld64.lld.darwinold -arch x86_64 -r %s 2>&1 | FileCheck %s
 
 # The file is built for the host, but the objc image info flags are for
 # the simulator.

diff  --git a/lld/test/mach-o/objc-image-info-invalid-size.yaml b/lld/test/mach-o/objc-image-info-invalid-size.yaml
index a67f61a2fcca..ea00bfae077d 100644
--- a/lld/test/mach-o/objc-image-info-invalid-size.yaml
+++ b/lld/test/mach-o/objc-image-info-invalid-size.yaml
@@ -1,4 +1,4 @@
-# RUN: not ld64.lld -arch x86_64 -r %s 2>&1 | FileCheck %s
+# RUN: not ld64.lld.darwinold -arch x86_64 -r %s 2>&1 | FileCheck %s
 
 --- !mach-o
 arch:            x86_64

diff  --git a/lld/test/mach-o/objc-image-info-invalid-version.yaml b/lld/test/mach-o/objc-image-info-invalid-version.yaml
index 845ac56f12b1..c64206c436e8 100644
--- a/lld/test/mach-o/objc-image-info-invalid-version.yaml
+++ b/lld/test/mach-o/objc-image-info-invalid-version.yaml
@@ -1,4 +1,4 @@
-# RUN: not ld64.lld -arch x86_64 -r %s 2>&1 | FileCheck %s
+# RUN: not ld64.lld.darwinold -arch x86_64 -r %s 2>&1 | FileCheck %s
 
 --- !mach-o
 arch:            x86_64

diff  --git a/lld/test/mach-o/objc-image-info-mismatched-swift-version.yaml b/lld/test/mach-o/objc-image-info-mismatched-swift-version.yaml
index 238991782611..35539ca21cac 100644
--- a/lld/test/mach-o/objc-image-info-mismatched-swift-version.yaml
+++ b/lld/test/mach-o/objc-image-info-mismatched-swift-version.yaml
@@ -1,4 +1,4 @@
-# RUN: not ld64.lld -arch x86_64 -r %s %p/Inputs/swift-version-1.yaml 2>&1 | FileCheck %s
+# RUN: not ld64.lld.darwinold -arch x86_64 -r %s %p/Inputs/swift-version-1.yaml 2>&1 | FileCheck %s
 
 --- !mach-o
 arch:            x86_64

diff  --git a/lld/test/mach-o/objc-image-info-pass-output.yaml b/lld/test/mach-o/objc-image-info-pass-output.yaml
index c81e6bce1531..7f7953e3c892 100644
--- a/lld/test/mach-o/objc-image-info-pass-output.yaml
+++ b/lld/test/mach-o/objc-image-info-pass-output.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -ios_simulator_version_min 5.0 -arch x86_64 -r %s -o %t -print_atoms | FileCheck %s
+# RUN: ld64.lld.darwinold -ios_simulator_version_min 5.0 -arch x86_64 -r %s -o %t -print_atoms | FileCheck %s
 
 # Make sure that we have an objc image info in the output.  It should have
 # been generated by the objc pass.

diff  --git a/lld/test/mach-o/objc-image-info-simulator-vs-host.yaml b/lld/test/mach-o/objc-image-info-simulator-vs-host.yaml
index 4fda686c9027..37e5f7489d80 100644
--- a/lld/test/mach-o/objc-image-info-simulator-vs-host.yaml
+++ b/lld/test/mach-o/objc-image-info-simulator-vs-host.yaml
@@ -1,4 +1,4 @@
-# RUN: not ld64.lld -ios_simulator_version_min 5.0 -arch x86_64 -r %s 2>&1 | FileCheck %s
+# RUN: not ld64.lld.darwinold -ios_simulator_version_min 5.0 -arch x86_64 -r %s 2>&1 | FileCheck %s
 
 # The file is built for the simulator, but the objc image info flags are for
 # the host.

diff  --git a/lld/test/mach-o/objc-image-info-unsupported-gc.yaml b/lld/test/mach-o/objc-image-info-unsupported-gc.yaml
index 1014b4acf7cc..4615e7ebed49 100644
--- a/lld/test/mach-o/objc-image-info-unsupported-gc.yaml
+++ b/lld/test/mach-o/objc-image-info-unsupported-gc.yaml
@@ -1,4 +1,4 @@
-# RUN: not ld64.lld -arch x86_64 -r %s 2>&1 | FileCheck %s
+# RUN: not ld64.lld.darwinold -arch x86_64 -r %s 2>&1 | FileCheck %s
 
 --- !mach-o
 arch:            x86_64

diff  --git a/lld/test/mach-o/objc_export_list.yaml b/lld/test/mach-o/objc_export_list.yaml
index 55dff8d3e856..1629c1880130 100644
--- a/lld/test/mach-o/objc_export_list.yaml
+++ b/lld/test/mach-o/objc_export_list.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -dylib %s -o %t \
+# RUN: ld64.lld.darwinold -arch x86_64 -dylib %s -o %t \
 # RUN:     -exported_symbol .objc_class_name_Foo %p/Inputs/x86_64/libSystem.yaml
 # RUN: llvm-nm -m %t | FileCheck %s
 #

diff  --git a/lld/test/mach-o/order_file-basic.yaml b/lld/test/mach-o/order_file-basic.yaml
index 8c43ee6a7aaa..9dc1c009921f 100644
--- a/lld/test/mach-o/order_file-basic.yaml
+++ b/lld/test/mach-o/order_file-basic.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 %s %p/Inputs/x86_64/libSystem.yaml \
+# RUN: ld64.lld.darwinold -arch x86_64 %s %p/Inputs/x86_64/libSystem.yaml \
 # RUN:     -order_file %p/Inputs/order_file-basic.order \
 # RUN:     -force_load %p/Inputs/libfoo.a -o %t
 # RUN: llvm-nm -m -n %t | FileCheck %s

diff  --git a/lld/test/mach-o/parse-aliases.yaml b/lld/test/mach-o/parse-aliases.yaml
index 9d0a1c07dfce..59dcb546c7c6 100644
--- a/lld/test/mach-o/parse-aliases.yaml
+++ b/lld/test/mach-o/parse-aliases.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -r -print_atoms %s -o %t  | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 -r -print_atoms %s -o %t  | FileCheck %s
 #
 # Test multiple labels to same address parse into aliases.
 #

diff  --git a/lld/test/mach-o/parse-arm-relocs.yaml b/lld/test/mach-o/parse-arm-relocs.yaml
index 9add766bef0c..26e1dcf9dae7 100644
--- a/lld/test/mach-o/parse-arm-relocs.yaml
+++ b/lld/test/mach-o/parse-arm-relocs.yaml
@@ -1,5 +1,5 @@
-# RUN: ld64.lld -arch armv7 -r -print_atoms %s -o %t   | FileCheck %s
-# RUN: ld64.lld -arch armv7 -r -print_atoms %t -o %t2  | FileCheck %s
+# RUN: ld64.lld.darwinold -arch armv7 -r -print_atoms %s -o %t   | FileCheck %s
+# RUN: ld64.lld.darwinold -arch armv7 -r -print_atoms %t -o %t2  | FileCheck %s
 #
 # Test parsing of armv7 relocations.
 #

diff  --git a/lld/test/mach-o/parse-cfstring32.yaml b/lld/test/mach-o/parse-cfstring32.yaml
index 52588d561dd9..aee244ab931b 100644
--- a/lld/test/mach-o/parse-cfstring32.yaml
+++ b/lld/test/mach-o/parse-cfstring32.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch i386 -r -print_atoms %s -o %t  | FileCheck %s
+# RUN: ld64.lld.darwinold -arch i386 -r -print_atoms %s -o %t  | FileCheck %s
 #
 # Test parsing of mach-o functions.
 #

diff  --git a/lld/test/mach-o/parse-cfstring64.yaml b/lld/test/mach-o/parse-cfstring64.yaml
index f427ae51b648..2725047a5b6f 100644
--- a/lld/test/mach-o/parse-cfstring64.yaml
+++ b/lld/test/mach-o/parse-cfstring64.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -r -print_atoms %s -o %t  | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 -r -print_atoms %s -o %t  | FileCheck %s
 #
 # Test parsing of CFString constants.
 #

diff  --git a/lld/test/mach-o/parse-compact-unwind32.yaml b/lld/test/mach-o/parse-compact-unwind32.yaml
index 6af5fd4a2371..3b0edff5cfca 100644
--- a/lld/test/mach-o/parse-compact-unwind32.yaml
+++ b/lld/test/mach-o/parse-compact-unwind32.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch i386 -r -print_atoms %s -o %t  | FileCheck %s
+# RUN: ld64.lld.darwinold -arch i386 -r -print_atoms %s -o %t  | FileCheck %s
 #
 # Test parsing of __LD/__compact_unwind (compact unwind) section.
 #

diff  --git a/lld/test/mach-o/parse-compact-unwind64.yaml b/lld/test/mach-o/parse-compact-unwind64.yaml
index f0c1c86c2c07..a3d2cdfcaf3c 100644
--- a/lld/test/mach-o/parse-compact-unwind64.yaml
+++ b/lld/test/mach-o/parse-compact-unwind64.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -r -print_atoms %s -o %t  | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 -r -print_atoms %s -o %t  | FileCheck %s
 #
 # Test parsing of __LD/__compact_unwind (compact unwind) section.
 #

diff  --git a/lld/test/mach-o/parse-data-in-code-armv7.yaml b/lld/test/mach-o/parse-data-in-code-armv7.yaml
index 061868cdb501..6f8ffa914025 100644
--- a/lld/test/mach-o/parse-data-in-code-armv7.yaml
+++ b/lld/test/mach-o/parse-data-in-code-armv7.yaml
@@ -1,6 +1,6 @@
-# RUN: ld64.lld -arch armv7 -r -print_atoms %s -o %t  | FileCheck %s
-# RUN: ld64.lld -arch armv7 -r -print_atoms %t -o %t2  | FileCheck %s
-# RUN: ld64.lld -arch armv7 -dylib %s -o %t3.dylib %p/Inputs/armv7/libSystem.yaml \
+# RUN: ld64.lld.darwinold -arch armv7 -r -print_atoms %s -o %t  | FileCheck %s
+# RUN: ld64.lld.darwinold -arch armv7 -r -print_atoms %t -o %t2  | FileCheck %s
+# RUN: ld64.lld.darwinold -arch armv7 -dylib %s -o %t3.dylib %p/Inputs/armv7/libSystem.yaml \
 # RUN:   && llvm-objdump --macho --private-headers %t3.dylib | FileCheck --check-prefix=CHECK2 %s
 #
 # Test parsing LC_DATA_IN_CODE

diff  --git a/lld/test/mach-o/parse-data-in-code-x86.yaml b/lld/test/mach-o/parse-data-in-code-x86.yaml
index 927a9aa30cb0..34de2d6f9439 100644
--- a/lld/test/mach-o/parse-data-in-code-x86.yaml
+++ b/lld/test/mach-o/parse-data-in-code-x86.yaml
@@ -1,5 +1,5 @@
-# RUN: ld64.lld -arch i386 -r -print_atoms %s -o %t  | FileCheck %s \
-# RUN: && ld64.lld -arch i386 -r -print_atoms %t -o %t2  | FileCheck %s
+# RUN: ld64.lld.darwinold -arch i386 -r -print_atoms %s -o %t  | FileCheck %s \
+# RUN: && ld64.lld.darwinold -arch i386 -r -print_atoms %t -o %t2  | FileCheck %s
 #
 # Test parsing LC_DATA_IN_CODE
 #

diff  --git a/lld/test/mach-o/parse-data-relocs-arm64.yaml b/lld/test/mach-o/parse-data-relocs-arm64.yaml
index a46da1bffba3..504d69f99712 100644
--- a/lld/test/mach-o/parse-data-relocs-arm64.yaml
+++ b/lld/test/mach-o/parse-data-relocs-arm64.yaml
@@ -1,5 +1,5 @@
-# RUN: ld64.lld -arch arm64 -r -print_atoms %s -o %t | FileCheck %s
-# RUN: ld64.lld -arch arm64 -r -print_atoms %t -o %t2 | FileCheck %s
+# RUN: ld64.lld.darwinold -arch arm64 -r -print_atoms %s -o %t | FileCheck %s
+# RUN: ld64.lld.darwinold -arch arm64 -r -print_atoms %t -o %t2 | FileCheck %s
 #
 # Test parsing and writing of arm64 data relocations.
 #

diff  --git a/lld/test/mach-o/parse-data-relocs-x86_64.yaml b/lld/test/mach-o/parse-data-relocs-x86_64.yaml
index 994289b5cdc6..8aea7cc88778 100644
--- a/lld/test/mach-o/parse-data-relocs-x86_64.yaml
+++ b/lld/test/mach-o/parse-data-relocs-x86_64.yaml
@@ -1,6 +1,6 @@
 
-# RUN: ld64.lld -arch x86_64 -r %s -o %t -print_atoms | FileCheck %s \
-# RUN: && ld64.lld -arch x86_64 %t -r -print_atoms -o %t2  | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 -r %s -o %t -print_atoms | FileCheck %s \
+# RUN: && ld64.lld.darwinold -arch x86_64 %t -r -print_atoms -o %t2  | FileCheck %s
 #
 # Test parsing and writing of x86_64 data relocations.
 #

diff  --git a/lld/test/mach-o/parse-data.yaml b/lld/test/mach-o/parse-data.yaml
index 3b9eb9fb6288..ec8a2ad439c4 100644
--- a/lld/test/mach-o/parse-data.yaml
+++ b/lld/test/mach-o/parse-data.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -r -print_atoms %s -o %t  | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 -r -print_atoms %s -o %t  | FileCheck %s
 #
 # Test parsing of mach-o data symbols.
 #

diff  --git a/lld/test/mach-o/parse-eh-frame-relocs-x86_64.yaml b/lld/test/mach-o/parse-eh-frame-relocs-x86_64.yaml
index 0bc47ffef009..c82c85f0ec0c 100644
--- a/lld/test/mach-o/parse-eh-frame-relocs-x86_64.yaml
+++ b/lld/test/mach-o/parse-eh-frame-relocs-x86_64.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s
 #
 # Test parsing of x86_64 __eh_frame (dwarf unwind) relocations.
 

diff  --git a/lld/test/mach-o/parse-eh-frame-x86-anon.yaml b/lld/test/mach-o/parse-eh-frame-x86-anon.yaml
index 7a85dcb2de90..feb914b581b9 100644
--- a/lld/test/mach-o/parse-eh-frame-x86-anon.yaml
+++ b/lld/test/mach-o/parse-eh-frame-x86-anon.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch i386 -r -print_atoms %s -o %t  | FileCheck %s
+# RUN: ld64.lld.darwinold -arch i386 -r -print_atoms %s -o %t  | FileCheck %s
 #
 # Test parsing of new __eh_frame (dwarf unwind) section that has no .eh labels
 # and no relocations.

diff  --git a/lld/test/mach-o/parse-eh-frame-x86-labeled.yaml b/lld/test/mach-o/parse-eh-frame-x86-labeled.yaml
index 7ec86de6d012..b1853ae9ac46 100644
--- a/lld/test/mach-o/parse-eh-frame-x86-labeled.yaml
+++ b/lld/test/mach-o/parse-eh-frame-x86-labeled.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch i386 -r -print_atoms %s -o %t  | FileCheck %s
+# RUN: ld64.lld.darwinold -arch i386 -r -print_atoms %s -o %t  | FileCheck %s
 #
 # Test parsing of old __eh_frame (dwarf unwind) section that has .eh labels
 # and relocations.

diff  --git a/lld/test/mach-o/parse-eh-frame.yaml b/lld/test/mach-o/parse-eh-frame.yaml
index 6571c4f4d2d8..014e1f21c005 100644
--- a/lld/test/mach-o/parse-eh-frame.yaml
+++ b/lld/test/mach-o/parse-eh-frame.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -r -print_atoms %s -o %t  | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 -r -print_atoms %s -o %t  | FileCheck %s
 #
 # Test parsing of __eh_frame (dwarf unwind) section.
 #

diff  --git a/lld/test/mach-o/parse-function.yaml b/lld/test/mach-o/parse-function.yaml
index 677cf9a7f166..b6d24fee6ff6 100644
--- a/lld/test/mach-o/parse-function.yaml
+++ b/lld/test/mach-o/parse-function.yaml
@@ -1,5 +1,5 @@
-# RUN: ld64.lld -arch x86_64 -r %s -o %t
-# RUN: ld64.lld -arch x86_64 -r %t -print_atoms -o %t2 | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 -r %s -o %t
+# RUN: ld64.lld.darwinold -arch x86_64 -r %t -print_atoms -o %t2 | FileCheck %s
 #
 # Test parsing of mach-o functions.
 #

diff  --git a/lld/test/mach-o/parse-initializers32.yaml b/lld/test/mach-o/parse-initializers32.yaml
index b15f2954a4bb..5f243198050e 100644
--- a/lld/test/mach-o/parse-initializers32.yaml
+++ b/lld/test/mach-o/parse-initializers32.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch i386 -r -print_atoms %s -o %t  | FileCheck %s
+# RUN: ld64.lld.darwinold -arch i386 -r -print_atoms %s -o %t  | FileCheck %s
 #
 # Test parsing of literal sections.
 #

diff  --git a/lld/test/mach-o/parse-initializers64.yaml b/lld/test/mach-o/parse-initializers64.yaml
index 9b3cb2d2264f..8d1503ba6665 100644
--- a/lld/test/mach-o/parse-initializers64.yaml
+++ b/lld/test/mach-o/parse-initializers64.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -r -print_atoms %s -o %t  | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 -r -print_atoms %s -o %t  | FileCheck %s
 #
 # Test parsing of literal sections.
 #

diff  --git a/lld/test/mach-o/parse-literals-error.yaml b/lld/test/mach-o/parse-literals-error.yaml
index de8b47c53047..b426c819422f 100644
--- a/lld/test/mach-o/parse-literals-error.yaml
+++ b/lld/test/mach-o/parse-literals-error.yaml
@@ -1,4 +1,4 @@
-# RUN: not ld64.lld -arch x86_64 -r -print_atoms %s -o %t 2> %t.err
+# RUN: not ld64.lld.darwinold -arch x86_64 -r -print_atoms %s -o %t 2> %t.err
 # RUN: FileCheck %s < %t.err
 #
 # Test for error if literal section is not correct size multiple.

diff  --git a/lld/test/mach-o/parse-literals.yaml b/lld/test/mach-o/parse-literals.yaml
index f23653d475a9..8792e9524206 100644
--- a/lld/test/mach-o/parse-literals.yaml
+++ b/lld/test/mach-o/parse-literals.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -r -print_atoms %s -o %t  | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 -r -print_atoms %s -o %t  | FileCheck %s
 #
 # Test parsing of literal sections.
 #

diff  --git a/lld/test/mach-o/parse-non-lazy-pointers.yaml b/lld/test/mach-o/parse-non-lazy-pointers.yaml
index 9d6a86221b2f..591c116e00c6 100644
--- a/lld/test/mach-o/parse-non-lazy-pointers.yaml
+++ b/lld/test/mach-o/parse-non-lazy-pointers.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch i386 -r -print_atoms %s -o %t  | FileCheck %s
+# RUN: ld64.lld.darwinold -arch i386 -r -print_atoms %s -o %t  | FileCheck %s
 #
 # Test parsing of non-lazy-pointer sections.
 #

diff  --git a/lld/test/mach-o/parse-relocs-x86.yaml b/lld/test/mach-o/parse-relocs-x86.yaml
index b93b43645714..b1bd6199ff0a 100644
--- a/lld/test/mach-o/parse-relocs-x86.yaml
+++ b/lld/test/mach-o/parse-relocs-x86.yaml
@@ -1,5 +1,5 @@
-# RUN: ld64.lld -arch i386 -r -print_atoms %s -o %t  | FileCheck %s \
-# RUN: && ld64.lld -arch i386 -r -print_atoms %t -o %t2  | FileCheck %s
+# RUN: ld64.lld.darwinold -arch i386 -r -print_atoms %s -o %t  | FileCheck %s \
+# RUN: && ld64.lld.darwinold -arch i386 -r -print_atoms %t -o %t2  | FileCheck %s
 #
 # Test parsing and writing of x86 relocations.
 #

diff  --git a/lld/test/mach-o/parse-section-no-symbol.yaml b/lld/test/mach-o/parse-section-no-symbol.yaml
index 6164f0e3aaaf..a1747e97c126 100644
--- a/lld/test/mach-o/parse-section-no-symbol.yaml
+++ b/lld/test/mach-o/parse-section-no-symbol.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -r %s -print_atoms -o %t2 | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 -r %s -print_atoms -o %t2 | FileCheck %s
 #
 # Test parsing of mach-o functions with no symbols at all.
 #

diff  --git a/lld/test/mach-o/parse-tentative-defs.yaml b/lld/test/mach-o/parse-tentative-defs.yaml
index 63596e9e37ad..345038b00859 100644
--- a/lld/test/mach-o/parse-tentative-defs.yaml
+++ b/lld/test/mach-o/parse-tentative-defs.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -r -print_atoms %s -o %t  | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 -r -print_atoms %s -o %t  | FileCheck %s
 #
 # Test parsing of tentative definitions, including size, scope, and alignment.
 #

diff  --git a/lld/test/mach-o/parse-text-relocs-arm64.yaml b/lld/test/mach-o/parse-text-relocs-arm64.yaml
index 9112782eba98..1c0922bd29f9 100644
--- a/lld/test/mach-o/parse-text-relocs-arm64.yaml
+++ b/lld/test/mach-o/parse-text-relocs-arm64.yaml
@@ -1,5 +1,5 @@
-# RUN: ld64.lld -arch arm64 -r -print_atoms %s -o %t | FileCheck %s \
-# RUN:  && ld64.lld -arch arm64 -r -print_atoms %t -o %t2 | FileCheck %s
+# RUN: ld64.lld.darwinold -arch arm64 -r -print_atoms %s -o %t | FileCheck %s \
+# RUN:  && ld64.lld.darwinold -arch arm64 -r -print_atoms %t -o %t2 | FileCheck %s
 #
 # Test parsing and writing of arm64 text relocations.
 #

diff  --git a/lld/test/mach-o/parse-text-relocs-x86_64.yaml b/lld/test/mach-o/parse-text-relocs-x86_64.yaml
index 76df030c69ed..d5ce60dca2e9 100644
--- a/lld/test/mach-o/parse-text-relocs-x86_64.yaml
+++ b/lld/test/mach-o/parse-text-relocs-x86_64.yaml
@@ -1,5 +1,5 @@
-# RUN: ld64.lld -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s \
-# RUN:  && ld64.lld -arch x86_64 -r -print_atoms %t -o %t2 | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s \
+# RUN:  && ld64.lld.darwinold -arch x86_64 -r -print_atoms %t -o %t2 | FileCheck %s
 #
 # Test parsing and writing of x86_64 text relocations.
 #

diff  --git a/lld/test/mach-o/parse-tlv-relocs-x86-64.yaml b/lld/test/mach-o/parse-tlv-relocs-x86-64.yaml
index b1a12e20ff7b..7c968dc094a7 100644
--- a/lld/test/mach-o/parse-tlv-relocs-x86-64.yaml
+++ b/lld/test/mach-o/parse-tlv-relocs-x86-64.yaml
@@ -1,5 +1,5 @@
-# RUN: ld64.lld -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s \
-# RUN:  && ld64.lld -arch x86_64 -r -print_atoms %t -o %t2 | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s \
+# RUN:  && ld64.lld.darwinold -arch x86_64 -r -print_atoms %t -o %t2 | FileCheck %s
 #
 # Test parsing of x86_64 tlv relocations.
 

diff  --git a/lld/test/mach-o/re-exported-dylib-ordinal.yaml b/lld/test/mach-o/re-exported-dylib-ordinal.yaml
index b25a5ec00221..8fb5ac8b9967 100644
--- a/lld/test/mach-o/re-exported-dylib-ordinal.yaml
+++ b/lld/test/mach-o/re-exported-dylib-ordinal.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s \
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s \
 # RUN: %p/Inputs/re-exported-dylib-ordinal.yaml \
 # RUN: %p/Inputs/re-exported-dylib-ordinal2.yaml \
 # RUN: %p/Inputs/re-exported-dylib-ordinal3.yaml -dylib -o %t \

diff  --git a/lld/test/mach-o/rpath.yaml b/lld/test/mach-o/rpath.yaml
index 3ffce99b53e9..604eafefb119 100644
--- a/lld/test/mach-o/rpath.yaml
+++ b/lld/test/mach-o/rpath.yaml
@@ -1,5 +1,5 @@
 # Check we handle -rpath correctly:
-# RUN: ld64.lld -arch x86_64 -rpath @loader_path/../Frameworks \
+# RUN: ld64.lld.darwinold -arch x86_64 -rpath @loader_path/../Frameworks \
 # RUN:     %p/Inputs/x86_64/libSystem.yaml %s -o %t
 # RUN: llvm-objdump --private-headers %t | FileCheck %s --check-prefix=CHECK-BINARY-WRITE
 

diff  --git a/lld/test/mach-o/run-tlv-pass-x86-64.yaml b/lld/test/mach-o/run-tlv-pass-x86-64.yaml
index ca1d8b260f6d..73b8c37f10af 100644
--- a/lld/test/mach-o/run-tlv-pass-x86-64.yaml
+++ b/lld/test/mach-o/run-tlv-pass-x86-64.yaml
@@ -1,5 +1,5 @@
-# RUN: ld64.lld -macosx_version_min 10.7 -arch x86_64 -print_atoms %s -o %t | FileCheck %s
-# RUN: not ld64.lld -macosx_version_min 10.6 -arch x86_64 -o %t %s 2> %t2
+# RUN: ld64.lld.darwinold -macosx_version_min 10.7 -arch x86_64 -print_atoms %s -o %t | FileCheck %s
+# RUN: not ld64.lld.darwinold -macosx_version_min 10.6 -arch x86_64 -o %t %s 2> %t2
 # RUN: FileCheck < %t2 %s --check-prefix=CHECK-ERROR
 # RUN: llvm-objdump --macho --private-headers %t | FileCheck %s --check-prefix=CHECK-LOADCMDS
 #

diff  --git a/lld/test/mach-o/sdk-version-error.yaml b/lld/test/mach-o/sdk-version-error.yaml
index c7e4011b238c..c3c497022d84 100644
--- a/lld/test/mach-o/sdk-version-error.yaml
+++ b/lld/test/mach-o/sdk-version-error.yaml
@@ -1,4 +1,4 @@
-# RUN: not ld64.lld -arch x86_64 -sdk_version 10.blah %s -o %t 2>&1 | FileCheck %s --check-prefix=ERROR
+# RUN: not ld64.lld.darwinold -arch x86_64 -sdk_version 10.blah %s -o %t 2>&1 | FileCheck %s --check-prefix=ERROR
 
 --- !mach-o
 arch:            x86_64

diff  --git a/lld/test/mach-o/sectalign.yaml b/lld/test/mach-o/sectalign.yaml
index 9c6c0ccbfef4..2270faff04e4 100644
--- a/lld/test/mach-o/sectalign.yaml
+++ b/lld/test/mach-o/sectalign.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -dylib \
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -dylib \
 # RUN:    -sectalign __DATA __custom 0x800 -sectalign __TEXT __text 0x400 \
 # RUN:    %p/Inputs/x86_64/libSystem.yaml -o %t \
 # RUN: && llvm-readobj --sections %t | FileCheck %s

diff  --git a/lld/test/mach-o/sectattrs.yaml b/lld/test/mach-o/sectattrs.yaml
index b9515f36026a..b2a71720c5eb 100644
--- a/lld/test/mach-o/sectattrs.yaml
+++ b/lld/test/mach-o/sectattrs.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -dylib \
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -dylib \
 # RUN:    %p/Inputs/x86_64/libSystem.yaml -o %t \
 # RUN: && llvm-objdump --private-headers %t | FileCheck %s
 #

diff  --git a/lld/test/mach-o/sectcreate.yaml b/lld/test/mach-o/sectcreate.yaml
index bc17dec25a45..1252b492dda5 100644
--- a/lld/test/mach-o/sectcreate.yaml
+++ b/lld/test/mach-o/sectcreate.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -r -arch x86_64 -o %t -sectcreate __DATA __data \
+# RUN: ld64.lld.darwinold -r -arch x86_64 -o %t -sectcreate __DATA __data \
 # RUN:   %p/Inputs/hw.raw_bytes -print_atoms | FileCheck %s
 
 # CHECK: --- !native

diff  --git a/lld/test/mach-o/seg-protection-arm64.yaml b/lld/test/mach-o/seg-protection-arm64.yaml
index f5f57eb3956b..0a17574ef32b 100644
--- a/lld/test/mach-o/seg-protection-arm64.yaml
+++ b/lld/test/mach-o/seg-protection-arm64.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch arm64 %s %p/Inputs/hello-world-arm64.yaml -o %t && llvm-objdump --private-headers %t | FileCheck %s
+# RUN: ld64.lld.darwinold -arch arm64 %s %p/Inputs/hello-world-arm64.yaml -o %t && llvm-objdump --private-headers %t | FileCheck %s
 
 --- !mach-o
 arch:            arm64

diff  --git a/lld/test/mach-o/seg-protection-x86_64.yaml b/lld/test/mach-o/seg-protection-x86_64.yaml
index 42915d4f0a3d..b68929d69e61 100644
--- a/lld/test/mach-o/seg-protection-x86_64.yaml
+++ b/lld/test/mach-o/seg-protection-x86_64.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 %s %p/Inputs/hello-world-x86_64.yaml -o %t && llvm-objdump --private-headers %t | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 %s %p/Inputs/hello-world-x86_64.yaml -o %t && llvm-objdump --private-headers %t | FileCheck %s
 
 --- !mach-o
 arch:            x86_64

diff  --git a/lld/test/mach-o/source-version.yaml b/lld/test/mach-o/source-version.yaml
index aef1af493e81..6a19ec6fa0b0 100644
--- a/lld/test/mach-o/source-version.yaml
+++ b/lld/test/mach-o/source-version.yaml
@@ -1,5 +1,5 @@
-# RUN: not ld64.lld -arch x86_64 -source_version 10.blah %s -o %t 2>&1 | FileCheck %s --check-prefix=ERROR
-# RUN: ld64.lld -arch x86_64 -source_version 10.1.2.3.4 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml && llvm-objdump --private-headers %t | FileCheck %s
+# RUN: not ld64.lld.darwinold -arch x86_64 -source_version 10.blah %s -o %t 2>&1 | FileCheck %s --check-prefix=ERROR
+# RUN: ld64.lld.darwinold -arch x86_64 -source_version 10.1.2.3.4 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml && llvm-objdump --private-headers %t | FileCheck %s
 
 --- !mach-o
 arch:            x86_64

diff  --git a/lld/test/mach-o/stack-size.yaml b/lld/test/mach-o/stack-size.yaml
index 9801649a4232..35a1700b7dd5 100644
--- a/lld/test/mach-o/stack-size.yaml
+++ b/lld/test/mach-o/stack-size.yaml
@@ -1,10 +1,10 @@
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.9 %s -o %t %p/Inputs/x86_64/libSystem.yaml
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.9 %s -o %t %p/Inputs/x86_64/libSystem.yaml
 # RUN: llvm-objdump --private-headers %t | FileCheck --check-prefix=CHECK-DEFAULT %s
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.9 %s -o %t -stack_size 31415926000 %p/Inputs/x86_64/libSystem.yaml
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.9 %s -o %t -stack_size 31415926000 %p/Inputs/x86_64/libSystem.yaml
 # RUN: llvm-objdump --private-headers %t | FileCheck --check-prefix=CHECK-EXPLICIT %s
-# RUN: not ld64.lld -arch x86_64 -stack_size 0x31415926530 %s >/dev/null 2> %t
+# RUN: not ld64.lld.darwinold -arch x86_64 -stack_size 0x31415926530 %s >/dev/null 2> %t
 # RUN: FileCheck < %t %s --check-prefix=CHECK-ERROR-MISPAGED
-# RUN: not ld64.lld -arch x86_64 -stack_size hithere %s >/dev/null 2> %t
+# RUN: not ld64.lld.darwinold -arch x86_64 -stack_size hithere %s >/dev/null 2> %t
 # RUN: FileCheck < %t %s --check-prefix=CHECK-ERROR-NOTHEX
 
 --- !native

diff  --git a/lld/test/mach-o/string-table.yaml b/lld/test/mach-o/string-table.yaml
index 8bb4cfe495ad..d22c13945b42 100644
--- a/lld/test/mach-o/string-table.yaml
+++ b/lld/test/mach-o/string-table.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch i386 %s %p/Inputs/hello-world-x86.yaml -o %t
+# RUN: ld64.lld.darwinold -arch i386 %s %p/Inputs/hello-world-x86.yaml -o %t
 # RUN: obj2yaml %t | FileCheck %s
 #
 # Test that the string table contains a ' ' as its first symbol

diff  --git a/lld/test/mach-o/stub-link.s b/lld/test/mach-o/stub-link.s
index fb12b76f44d9..e0b053605582 100644
--- a/lld/test/mach-o/stub-link.s
+++ b/lld/test/mach-o/stub-link.s
@@ -3,7 +3,7 @@
 # RUN: mkdir -p %t
 #
 # RUN: llvm-mc -filetype obj -triple x86_64-apple-darwin %s -o %t/test.o
-# RUN: ld64.lld -o %t/test -Z -L%S/Inputs/MacOSX.sdk/usr/lib -lSystem %t/test.o
+# RUN: ld64.lld.darwinold -o %t/test -Z -L%S/Inputs/MacOSX.sdk/usr/lib -lSystem %t/test.o
 #
 # RUN: llvm-objdump --bind --no-show-raw-insn -d -r %t/test | FileCheck %s
 

diff  --git a/lld/test/mach-o/subsections-via-symbols-default.yaml b/lld/test/mach-o/subsections-via-symbols-default.yaml
index fe28a7fa3f99..44e11bcc6df7 100644
--- a/lld/test/mach-o/subsections-via-symbols-default.yaml
+++ b/lld/test/mach-o/subsections-via-symbols-default.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -ios_simulator_version_min 5.0 -arch x86_64 -r %s -o %t
+# RUN: ld64.lld.darwinold -ios_simulator_version_min 5.0 -arch x86_64 -r %s -o %t
 # RUN: llvm-readobj --file-headers %t | FileCheck %s
 
 # Make sure that we have an objc image info in the output.  It should have

diff  --git a/lld/test/mach-o/twolevel_namespace_undef_dynamic_lookup.yaml b/lld/test/mach-o/twolevel_namespace_undef_dynamic_lookup.yaml
index a8ceb0f81ce4..cc0e61b7b7d9 100644
--- a/lld/test/mach-o/twolevel_namespace_undef_dynamic_lookup.yaml
+++ b/lld/test/mach-o/twolevel_namespace_undef_dynamic_lookup.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.9 -twolevel_namespace -undefined dynamic_lookup %s -o %t %p/Inputs/x86_64/libSystem.yaml
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.9 -twolevel_namespace -undefined dynamic_lookup %s -o %t %p/Inputs/x86_64/libSystem.yaml
 #
 # Sanity check '-twolevel_namespace -undefined dynamic_lookup'.
 # This should pass without error, even though '_bar' is undefined.

diff  --git a/lld/test/mach-o/twolevel_namespace_undef_warning_suppress.yaml b/lld/test/mach-o/twolevel_namespace_undef_warning_suppress.yaml
index 6d9eaddacf99..1195c090f86a 100644
--- a/lld/test/mach-o/twolevel_namespace_undef_warning_suppress.yaml
+++ b/lld/test/mach-o/twolevel_namespace_undef_warning_suppress.yaml
@@ -1,6 +1,6 @@
-# RUN: not ld64.lld -arch x86_64 -macosx_version_min 10.9 -twolevel_namespace -undefined warning %s -o %t %p/Inputs/x86_64/libSystem.yaml 2>&1 | \
+# RUN: not ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.9 -twolevel_namespace -undefined warning %s -o %t %p/Inputs/x86_64/libSystem.yaml 2>&1 | \
 # RUN:   FileCheck --check-prefix=CHECK-WARNING %s
-# RUN: not ld64.lld -arch x86_64 -macosx_version_min 10.9 -twolevel_namespace -undefined suppress %s -o %t %p/Inputs/x86_64/libSystem.yaml 2>&1 | \
+# RUN: not ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.9 -twolevel_namespace -undefined suppress %s -o %t %p/Inputs/x86_64/libSystem.yaml 2>&1 | \
 # RUN:   FileCheck --check-prefix=CHECK-SUPPRESS %s
 
 --- !native

diff  --git a/lld/test/mach-o/unwind-info-simple-arm64.yaml b/lld/test/mach-o/unwind-info-simple-arm64.yaml
index fa264ef7318e..75d817a57989 100644
--- a/lld/test/mach-o/unwind-info-simple-arm64.yaml
+++ b/lld/test/mach-o/unwind-info-simple-arm64.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch arm64 -o %t %s \
+# RUN: ld64.lld.darwinold -arch arm64 -o %t %s \
 # RUN: %p/Inputs/unwind-info-simple-arm64.yaml -e _main %p/Inputs/arm64/libSystem.yaml
 # RUN: llvm-objdump --unwind-info %t | FileCheck %s
 

diff  --git a/lld/test/mach-o/unwind-info-simple-x86_64.yaml b/lld/test/mach-o/unwind-info-simple-x86_64.yaml
index a4efed385f65..a711f4457c2a 100644
--- a/lld/test/mach-o/unwind-info-simple-x86_64.yaml
+++ b/lld/test/mach-o/unwind-info-simple-x86_64.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 %s -o %t -e _main %p/Inputs/x86_64/libSystem.yaml
+# RUN: ld64.lld.darwinold -arch x86_64 %s -o %t -e _main %p/Inputs/x86_64/libSystem.yaml
 # RUN: llvm-objdump --unwind-info %t | FileCheck %s
 
 # CHECK: Contents of __unwind_info section:

diff  --git a/lld/test/mach-o/upward-dylib-load-command.yaml b/lld/test/mach-o/upward-dylib-load-command.yaml
index 0b5af1441778..6dbeb44895a4 100644
--- a/lld/test/mach-o/upward-dylib-load-command.yaml
+++ b/lld/test/mach-o/upward-dylib-load-command.yaml
@@ -1,6 +1,6 @@
-# RUN: ld64.lld -arch x86_64 -dylib %p/Inputs/bar.yaml \
+# RUN: ld64.lld.darwinold -arch x86_64 -dylib %p/Inputs/bar.yaml \
 # RUN:     -install_name /usr/lib/libbar.dylib %p/Inputs/x86_64/libSystem.yaml -o %t1.dylib
-# RUN: ld64.lld -arch x86_64 -dylib %s -upward_library  %t1.dylib \
+# RUN: ld64.lld.darwinold -arch x86_64 -dylib %s -upward_library  %t1.dylib \
 # RUN:      -install_name /usr/lib/libfoo.dylib %p/Inputs/x86_64/libSystem.yaml -o %t
 # RUN: llvm-objdump --private-headers %t | FileCheck %s
 #

diff  --git a/lld/test/mach-o/upward-dylib-paths.yaml b/lld/test/mach-o/upward-dylib-paths.yaml
index 48536330695a..509edd3d5ca8 100644
--- a/lld/test/mach-o/upward-dylib-paths.yaml
+++ b/lld/test/mach-o/upward-dylib-paths.yaml
@@ -1,6 +1,6 @@
 #
 #
-# RUN: ld64.lld -arch x86_64 -r -test_file_usage -v \
+# RUN: ld64.lld.darwinold -arch x86_64 -r -test_file_usage -v \
 # RUN:        -path_exists /Custom/Frameworks \
 # RUN:        -path_exists /Custom/Frameworks/Bar.framework/Bar \
 # RUN:        -path_exists /usr/lib \

diff  --git a/lld/test/mach-o/usage.yaml b/lld/test/mach-o/usage.yaml
index d95823d24b83..efae4d0d3144 100644
--- a/lld/test/mach-o/usage.yaml
+++ b/lld/test/mach-o/usage.yaml
@@ -1,4 +1,4 @@
-# RUN: not ld64.lld | FileCheck %s
+# RUN: not ld64.lld.darwinold | FileCheck %s
 #
 # Test that running darwin linker with no option prints out usage message.
 #

diff  --git a/lld/test/mach-o/use-dylib.yaml b/lld/test/mach-o/use-dylib.yaml
index 7436e180c29f..5717a9316fb7 100644
--- a/lld/test/mach-o/use-dylib.yaml
+++ b/lld/test/mach-o/use-dylib.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 %s \
+# RUN: ld64.lld.darwinold -arch x86_64 %s \
 # RUN: %p/Inputs/use-simple-dylib.yaml %p/Inputs/x86_64/libSystem.yaml -dylib -o %t.dylib
 # RUN: llvm-objdump --private-headers %t.dylib | FileCheck %s
 

diff  --git a/lld/test/mach-o/use-simple-dylib.yaml b/lld/test/mach-o/use-simple-dylib.yaml
index 09906597f8dd..62fb18f1f089 100644
--- a/lld/test/mach-o/use-simple-dylib.yaml
+++ b/lld/test/mach-o/use-simple-dylib.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 -print_atoms -r %s \
+# RUN: ld64.lld.darwinold -arch x86_64 -print_atoms -r %s \
 # RUN: %p/Inputs/use-simple-dylib.yaml -o %t | FileCheck %s
 
 

diff  --git a/lld/test/mach-o/version-min-load-command-object.yaml b/lld/test/mach-o/version-min-load-command-object.yaml
index cdfee24ce381..8d9089bc6c01 100644
--- a/lld/test/mach-o/version-min-load-command-object.yaml
+++ b/lld/test/mach-o/version-min-load-command-object.yaml
@@ -1,6 +1,6 @@
-# RUN: ld64.lld -arch x86_64 %s -o %t -r -macosx_version_min 10.8 && llvm-objdump --private-headers %t | FileCheck %s
-# RUN: ld64.lld -arch x86_64 %s -o %t -r && llvm-objdump --private-headers %t | FileCheck %s
-# RUN: ld64.lld -arch x86_64 %s -o %t -r %p/Inputs/no-version-min-load-command-object.yaml && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_VERSION_MIN
+# RUN: ld64.lld.darwinold -arch x86_64 %s -o %t -r -macosx_version_min 10.8 && llvm-objdump --private-headers %t | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 %s -o %t -r && llvm-objdump --private-headers %t | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 %s -o %t -r %p/Inputs/no-version-min-load-command-object.yaml && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_VERSION_MIN
 
 # If we are emitting an object file, then we only emit a min version load command if the source object file(s) all have
 # version(s) and either known platforms or contain min version load commands themselves.

diff  --git a/lld/test/mach-o/version-min-load-command.yaml b/lld/test/mach-o/version-min-load-command.yaml
index 38ceb17e0525..e31319dfb790 100644
--- a/lld/test/mach-o/version-min-load-command.yaml
+++ b/lld/test/mach-o/version-min-load-command.yaml
@@ -1,11 +1,11 @@
-# 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
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml 2>&1 | FileCheck %s --check-prefix=WARNING
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static -version_load_command && llvm-objdump --private-headers %t | FileCheck %s
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -no_version_load_command && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_VERSION_MIN
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static -version_load_command -no_version_load_command && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_VERSION_MIN
-# 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_VERSION_MIN
+# 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
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml 2>&1 | FileCheck %s --check-prefix=WARNING
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static -version_load_command && llvm-objdump --private-headers %t | FileCheck %s
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -no_version_load_command && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_VERSION_MIN
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static -version_load_command -no_version_load_command && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_VERSION_MIN
+# 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_VERSION_MIN
 
-# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 -sdk_version 10.9 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=SDK_VERSION
+# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 -sdk_version 10.9 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=SDK_VERSION
 
 --- !mach-o
 arch:            x86_64

diff  --git a/lld/test/mach-o/write-final-sections.yaml b/lld/test/mach-o/write-final-sections.yaml
index 204203a91894..d0c0f3c8b777 100644
--- a/lld/test/mach-o/write-final-sections.yaml
+++ b/lld/test/mach-o/write-final-sections.yaml
@@ -1,4 +1,4 @@
-# RUN: ld64.lld -arch x86_64 %s %p/Inputs/write-final-sections.yaml \
+# RUN: ld64.lld.darwinold -arch x86_64 %s %p/Inputs/write-final-sections.yaml \
 # RUN: -o %t -e _foo
 # RUN: llvm-readobj --sections --section-data %t | FileCheck %s
 

diff  --git a/lld/test/mach-o/wrong-arch-error.yaml b/lld/test/mach-o/wrong-arch-error.yaml
index d518c2943842..17bd024bc2b4 100644
--- a/lld/test/mach-o/wrong-arch-error.yaml
+++ b/lld/test/mach-o/wrong-arch-error.yaml
@@ -1,4 +1,4 @@
-# RUN: not ld64.lld -arch x86_64 -r %s \
+# RUN: not ld64.lld.darwinold -arch x86_64 -r %s \
 # RUN: %p/Inputs/wrong-arch-error.yaml 2> %t.err
 # RUN: FileCheck %s < %t.err
 

diff  --git a/lld/tools/lld/CMakeLists.txt b/lld/tools/lld/CMakeLists.txt
index 5cff736ff57f..e77b2161a873 100644
--- a/lld/tools/lld/CMakeLists.txt
+++ b/lld/tools/lld/CMakeLists.txt
@@ -25,7 +25,7 @@ install(TARGETS lld
 
 if(NOT LLD_SYMLINKS_TO_CREATE)
   set(LLD_SYMLINKS_TO_CREATE
-      lld-link ld.lld ld64.lld ld64.lld.darwinnew wasm-ld)
+      lld-link ld.lld ld64.lld ld64.lld.darwinnew ld64.lld.darwinold wasm-ld)
 endif()
 
 foreach(link ${LLD_SYMLINKS_TO_CREATE})

diff  --git a/lld/tools/lld/lld.cpp b/lld/tools/lld/lld.cpp
index 77d7792451f2..01605bc8be76 100644
--- a/lld/tools/lld/lld.cpp
+++ b/lld/tools/lld/lld.cpp
@@ -56,7 +56,7 @@ enum Flavor {
   Gnu,       // -flavor gnu
   WinLink,   // -flavor link
   Darwin,    // -flavor darwin
-  DarwinNew, // -flavor darwinnew
+  DarwinOld, // -flavor darwinold
   Wasm,      // -flavor wasm
 };
 
@@ -70,8 +70,9 @@ static Flavor getFlavor(StringRef s) {
       .CasesLower("ld", "ld.lld", "gnu", Gnu)
       .CasesLower("wasm", "ld-wasm", Wasm)
       .CaseLower("link", WinLink)
-      .CasesLower("ld64", "ld64.lld", "darwin", Darwin)
-      .CasesLower("darwinnew", "ld64.lld.darwinnew", DarwinNew)
+      .CasesLower("ld64", "ld64.lld", "darwin", "darwinnew",
+                  "ld64.lld.darwinnew", Darwin)
+      .CasesLower("darwinold", "ld64.lld.darwinold", DarwinOld)
       .Default(Invalid);
 }
 
@@ -154,9 +155,9 @@ static int lldMain(int argc, const char **argv, llvm::raw_ostream &stdoutOS,
   case WinLink:
     return !coff::link(args, exitEarly, stdoutOS, stderrOS);
   case Darwin:
-    return !mach_o::link(args, exitEarly, stdoutOS, stderrOS);
-  case DarwinNew:
     return !macho::link(args, exitEarly, stdoutOS, stderrOS);
+  case DarwinOld:
+    return !mach_o::link(args, exitEarly, stdoutOS, stderrOS);
   case Wasm:
     return !lld::wasm::link(args, exitEarly, stdoutOS, stderrOS);
   default:

diff  --git a/llvm/utils/gn/build/BUILD.gn b/llvm/utils/gn/build/BUILD.gn
index df30890c93bf..39848deabd4b 100644
--- a/llvm/utils/gn/build/BUILD.gn
+++ b/llvm/utils/gn/build/BUILD.gn
@@ -218,11 +218,7 @@ config("compiler_defaults") {
 
   # On Windows, the linker is not invoked through the compiler driver.
   if (use_lld && host_os != "win") {
-    if (host_os == "mac") {
-      ldflags += [ "-fuse-ld=lld.darwinnew" ]
-    } else {
-      ldflags += [ "-fuse-ld=lld" ]
-    }
+    ldflags += [ "-fuse-ld=lld" ]
   }
 
   if (llvm_build_instrumented_coverage) {

diff  --git a/llvm/utils/gn/secondary/lld/tools/lld/BUILD.gn b/llvm/utils/gn/secondary/lld/tools/lld/BUILD.gn
index 51489a478e74..ca87ca8a5c3b 100644
--- a/llvm/utils/gn/secondary/lld/tools/lld/BUILD.gn
+++ b/llvm/utils/gn/secondary/lld/tools/lld/BUILD.gn
@@ -5,6 +5,7 @@ symlinks = [
   "ld.lld",
   "ld64.lld",
   "ld64.lld.darwinnew",
+  "ld64.lld.darwinold",
   "wasm-ld",
 ]
 foreach(target, symlinks) {


        


More information about the llvm-commits mailing list