Page MenuHomePhabricator

lld-link: Make /linkrepro: take a filename, not a directory.
ClosedPublic

Authored by thakis on Wed, Sep 11, 12:51 PM.

Details

Summary

This makes lld-link behave like ld.lld. I don't see a reason for
the two drivers to have different behavior here.

While here, also make lld-link add a version.txt to the tar, like
ld.lld does.

Diff Detail

Repository
rL LLVM

Event Timeline

thakis created this revision.Wed, Sep 11, 12:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptWed, Sep 11, 12:51 PM
ruiu accepted this revision.Thu, Sep 12, 12:35 AM

LGTM

Thank you for doing this.

This revision is now accepted and ready to land.Thu, Sep 12, 12:35 AM
hans added a subscriber: hans.Thu, Sep 12, 12:39 AM

Nice!

But is there no help text or user manual that needs to be updated?

Nice!

But is there no help text or user manual that needs to be updated?

The help text is "Dump linker invocation and input files for debugging" which is noncommittal enough to not need changing :) Once this and D67456 are in I want to look at also supporting the env var for linkrepro like in the ELF port (and it should work even with /lldignoreenv set, since it doesn't affect the normal output) and port the recent ELF changes that change the help text to make it look less like a lld dev debug flag; I was thinking about changing the help text then.

This revision was automatically updated to reflect the committed changes.

I realized why the behavior was different: link.exe has a /linkrepro: flag that behaves like lld-link's used to (https://www.geoffchappell.com/studies/msvc/link/link/options/linkrepro.htm?tx=37). It also honors a link_repro env var.

So I think I'll have to revert this, and add a comment explaining why things are different.