This is an archive of the discontinued LLVM Phabricator instance.

[lld/mac] Support more flags for --reproduce
ClosedPublic

Authored by thakis on Apr 23 2021, 9:53 AM.

Details

Reviewers
int3
Group Reviewers
Restricted Project
Commits
rGa61891d491bd: [lld/mac] Support more flags for --reproduce
Summary

I went through the callers of readFile() and addFile() in Driver.cpp
and checked that the options that use them all get rewritten in the
--reproduce response file. -(un)exported_symbols_list and -bundle_loader
weren't, so add them.

Also spruce up the test for reproduce a bit and actually try linking
with the exptracted repro archive.

Motivated by the response file in PR50098 complaining abou the
-exported_symbols_list path being wrong :)

Diff Detail

Event Timeline

thakis created this revision.Apr 23 2021, 9:53 AM
Herald added a project: Restricted Project. · View Herald Transcript
thakis requested review of this revision.Apr 23 2021, 9:53 AM
int3 accepted this revision.Apr 23 2021, 10:23 AM
int3 added inline comments.
lld/test/MachO/reproduce.s
8

can we remove -platform_version here now that we include it in lit.local.cfg?

31

technically an accurate reproduction command would just be ld64.lld @response.txt since the other flags will be included in the response file

44

ditto

This revision is now accepted and ready to land.Apr 23 2021, 10:23 AM

Thanks!

lld/test/MachO/reproduce.s
8

the rsp check below matches the explicit versions here, and explicitly matching the ones from lit.local.cfg is maybe a bit awkward?

31

good point, done

This revision was landed with ongoing or failed builds.Apr 23 2021, 11:50 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 23 2021, 11:50 AM