[PATCH] D14741: Make ELF2 the default
Rafael Ávila de Espíndola via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 16 21:48:47 PST 2015
rafael created this revision.
rafael added a reviewer: ruiu.
rafael added a subscriber: llvm-commits.
With this the only way to get the old elf linker is "-flavor old-elf".
http://reviews.llvm.org/D14741
Files:
lib/Driver/UniversalDriver.cpp
test/old-elf/linker-as-ld.test
unittests/DriverTests/UniversalDriverTest.cpp
Index: unittests/DriverTests/UniversalDriverTest.cpp
===================================================================
--- unittests/DriverTests/UniversalDriverTest.cpp
+++ unittests/DriverTests/UniversalDriverTest.cpp
@@ -21,7 +21,7 @@
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);
Index: test/old-elf/linker-as-ld.test
===================================================================
--- test/old-elf/linker-as-ld.test
+++ test/old-elf/linker-as-ld.test
@@ -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
Index: lib/Driver/UniversalDriver.cpp
===================================================================
--- lib/Driver/UniversalDriver.cpp
+++ lib/Driver/UniversalDriver.cpp
@@ -91,7 +91,7 @@
.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 @@
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14741.40372.patch
Type: text/x-patch
Size: 1541 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151117/8c3a8156/attachment.bin>
More information about the llvm-commits
mailing list