This is an archive of the discontinued LLVM Phabricator instance.

[lld] Remove special cases from default ld driver mode.
ClosedPublic

Authored by danalbert on Apr 24 2020, 4:31 PM.

Details

Summary

Use the Gnu driver mode by default for all platforms when ld is
invoked. Other names for the program (such as link or ld64) continue
working as before.

Diff Detail

Event Timeline

danalbert created this revision.Apr 24 2020, 4:31 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 24 2020, 4:31 PM
srhines accepted this revision.Apr 24 2020, 4:59 PM

LGTM on the Android side. Thanks Dan for handling this.

This revision is now accepted and ready to land.Apr 24 2020, 4:59 PM
smeenai accepted this revision.Apr 24 2020, 5:24 PM
smeenai added a reviewer: ruiu.
smeenai added a subscriber: smeenai.

I think this should be fine. While the Darwin linker is indeed called ld as well, anyone who's using LLD for Darwin should be going through the Clang driver with -fuse-ld=lld, which will continue to do the right thing.

MaskRay accepted this revision.Apr 24 2020, 5:43 PM

Thanks!

ruiu accepted this revision.Apr 26 2020, 11:00 PM

LGTM

I think this behavior was carried over from the previous version of lld, but I believe this would cause confusion than being convenient. This is also against our general policy to make cross-linking easier, which is "lld should not change the behavior on which OS it is running".

This revision was automatically updated to reflect the committed changes.