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:
Rafael Espindola 2015-11-17 07:19:44 +00:00
parent 84c72b6d75
commit 7477e99af7
3 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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);