[lld] r253318 - Make ELF2 the default.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 16 23:19:44 PST 2015
Author: rafael
Date: Tue Nov 17 01:19:44 2015
New Revision: 253318
URL: http://llvm.org/viewvc/llvm-project?rev=253318&view=rev
Log:
Make ELF2 the default.
With this the only way to get the old elf linker is "-flavor old-elf".
Modified:
lld/trunk/lib/Driver/UniversalDriver.cpp
lld/trunk/test/old-elf/linker-as-ld.test
lld/trunk/unittests/DriverTests/UniversalDriverTest.cpp
Modified: lld/trunk/lib/Driver/UniversalDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/UniversalDriver.cpp?rev=253318&r1=253317&r2=253318&view=diff
==============================================================================
--- lld/trunk/lib/Driver/UniversalDriver.cpp (original)
+++ lld/trunk/lib/Driver/UniversalDriver.cpp Tue Nov 17 01:19:44 2015
@@ -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::MutableArr
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
Modified: lld/trunk/test/old-elf/linker-as-ld.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/old-elf/linker-as-ld.test?rev=253318&r1=253317&r2=253318&view=diff
==============================================================================
--- lld/trunk/test/old-elf/linker-as-ld.test (original)
+++ lld/trunk/test/old-elf/linker-as-ld.test Tue Nov 17 01:19:44 2015
@@ -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
Modified: lld/trunk/unittests/DriverTests/UniversalDriverTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/DriverTests/UniversalDriverTest.cpp?rev=253318&r1=253317&r2=253318&view=diff
==============================================================================
--- lld/trunk/unittests/DriverTests/UniversalDriverTest.cpp (original)
+++ lld/trunk/unittests/DriverTests/UniversalDriverTest.cpp Tue Nov 17 01:19:44 2015
@@ -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);
More information about the llvm-commits
mailing list