Make ELF2 the default.
With this the only way to get the old elf linker is "-flavor old-elf". llvm-svn: 253318
This commit is contained in:
parent
84c72b6d75
commit
7477e99af7
@ -91,7 +91,7 @@ static Flavor strToFlavor(StringRef str) {
|
||||
.Case("lld-link", Flavor::win_link)
|
||||
.Case("darwin", Flavor::darwin_ld)
|
||||
.Case("core", Flavor::core)
|
||||
.Case("ld", Flavor::old_gnu_ld)
|
||||
.Case("ld", Flavor::gnu_ld)
|
||||
.Default(Flavor::invalid);
|
||||
}
|
||||
|
||||
@ -153,7 +153,7 @@ static Flavor getFlavor(llvm::MutableArrayRef<const char *> &args,
|
||||
return Flavor::darwin_ld;
|
||||
#endif
|
||||
// On a ELF based systems, if linker binary is named "ld", use gnu driver.
|
||||
return Flavor::old_gnu_ld;
|
||||
return Flavor::gnu_ld;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
REQUIRES: system-linker-elf
|
||||
|
||||
RUN: mkdir -p %t.dir && cp `which lld` %t.dir/ld
|
||||
RUN: %t.dir/ld -target x86_64-linux -o %t %p/Inputs/relocs.x86-64 \
|
||||
RUN: %t.dir/ld -o %t %p/Inputs/relocs.x86-64 \
|
||||
RUN: -e _start -static
|
||||
RUN: llvm-readobj -t %t | FileCheck %s
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ using namespace llvm;
|
||||
using namespace lld;
|
||||
|
||||
TEST(UniversalDriver, flavor) {
|
||||
const char *args[] = {"old-ld"};
|
||||
const char *args[] = {"ld", "-flavor", "old-gnu"};
|
||||
|
||||
std::string diags;
|
||||
raw_string_ostream os(diags);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user