[lld-macho] Partial revert of D95204

Trying to unbreak https://lab.llvm.org/buildbot/#/builders/57/builds/4753

I'm not able to repro the failures locally so... here's hoping
This commit is contained in:
Jez Ng 2021-03-01 11:22:26 -08:00
parent 015d78a25e
commit 922de2574c
7 changed files with 17 additions and 18 deletions

View File

@ -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 LinkerIsLLDDarwinNew once there's only one MachO lld.
// FIXME: Remove lld.darwinnew here once it's the only MachO lld.
if (LinkerIsLLD)
*LinkerIsLLD = UseLinker == "lld" || UseLinker == "lld.darwinold";
*LinkerIsLLD = UseLinker == "lld" || UseLinker == "lld.darwinnew";
if (LinkerIsLLDDarwinNew)
*LinkerIsLLDDarwinNew = UseLinker == "lld";
*LinkerIsLLDDarwinNew = UseLinker == "lld.darwinnew";
return LinkerPath;
}
}

View File

@ -1,13 +1,12 @@
// 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.darwinold -B%S/Inputs/lld -mlinker-version=0 %s 2>&1 \
// RUN: | FileCheck %s
// RUN: %clang --target=x86_64-apple-darwin -### \
// RUN: -fuse-ld=lld -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: | FileCheck %s
// CHECK: "-demangle"

View File

@ -1,6 +1,6 @@
// RUN: touch %t.o
// RUN: %clang -target arm64-apple-ios12.3 -fuse-ld=lld.darwinold \
// RUN: %clang -target arm64-apple-ios12.3 -fuse-ld= \
// 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 \
// RUN: %clang -target arm64-apple-ios12.3 -fuse-ld=lld.darwinnew \
// 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 \
// RUN: %clang -target x86_64-apple-ios13-simulator -fuse-ld=lld.darwinnew \
// 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

View File

@ -1,10 +1,10 @@
// RUN: touch %t.o
// RUN: %clang -target x86_64-apple-macos10.13 -fuse-ld=lld.darwinold \
// RUN: %clang -target x86_64-apple-macos10.13 -fuse-ld= \
// 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 \
// RUN: %clang -target x86_64-apple-macos10.13 -fuse-ld=lld.darwinnew \
// 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 \
// RUN: %clang -target arm64-apple-macos10.13 -fuse-ld=lld.darwinnew \
// 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

View File

@ -1,6 +1,6 @@
// RUN: touch %t.o
// RUN: %clang -target arm64-apple-tvos12.3 -fuse-ld=lld.darwinold \
// RUN: %clang -target arm64-apple-tvos12.3 -fuse-ld= \
// 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 \
// RUN: %clang -target arm64-apple-tvos12.3 -fuse-ld=lld.darwinnew \
// 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

View File

@ -1,6 +1,6 @@
// RUN: touch %t.o
// RUN: %clang -target arm64_32-apple-watchos5.2 -fuse-ld=lld.darwinold \
// RUN: %clang -target arm64_32-apple-watchos5.2 -fuse-ld= \
// 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 \
// RUN: %clang -target arm64_32-apple-watchos5.2 -fuse-ld=lld.darwinnew \
// 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