[lld] r253318 - Make ELF2 the default.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 15:47:41 PST 2015


On 19 November 2015 at 01:00, Ed Maste <emaste at freebsd.org> wrote:
> On 17 November 2015 at 02:19, Rafael Espindola via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
>> 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/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"};
>
> Note that with this change this test is now ineffective. It's intended
> to verify that lld correctly switches on argv[0], e.g. when ld is a
> link to lld. We don't test that when we explicitly set -flavor. I took
> a quick look at fixing this but it's awkward as it seems the error
> handling for other flavors doesn't work the way the unit test needs,
> from UniversalDriver::link().

In which case we should probably just delete this test. That code path
is covered by pretty much every new elf lld test since they use
ld.lld.

Cheers,
Rafael


More information about the llvm-commits mailing list