llvm-project/lld/Common
Nico Weber 83e60f5a55 [lld/mac] Add --reproduce option
This adds support for ld.lld's --reproduce / lld-link's /reproduce:
flag to the MachO port. This flag can be added to a link command
to make the link write a tar file containing all inputs to the link
and a response file containing the link command. This can be used
to reproduce the link on another machine, which is useful for sharing
bug report inputs or performance test loads.

Since the linker is usually called through the clang driver and
adding linker flags can be a bit cumbersome, setting the env var
`LLD_REPRODUCE=foo.tar` triggers the feature as well.

The file response.txt in the archive can be used with
`ld64.lld.darwinnew $(cat response.txt)` as long as the contents are
smaller than the command-line limit, or with `ld64.lld.darwinnew
@response.txt` once D92149 is in.

The support in this patch is sufficient to create a tar file for
Chromium's base_unittests that can link after unpacking on a different
machine.

Differential Revision: https://reviews.llvm.org/D92274
2020-11-30 08:40:21 -05:00
..
Args.cpp [lld-macho] Make lld::getInteger() tolerate leading "0x"/"0X" when base is 16 2020-09-22 08:56:20 -07:00
CMakeLists.txt Remove HAVE_VCS_VERSION_INC, not needed 2020-10-29 13:09:05 -07:00
DWARF.cpp [LLD] Move duplicated dwarf parsing code to the Common library. NFC. 2019-10-21 08:01:52 +00:00
ErrorHandler.cpp [LLD][COFF] When using LLD-as-a-library, always prevent re-entrance on failures 2020-11-12 08:14:43 -05:00
Filesystem.cpp [LLD][ELF][Windows] small improvement to D82567 2020-07-13 12:02:20 +01:00
Memory.cpp [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
Reproduce.cpp [lld/mac] Add --reproduce option 2020-11-30 08:40:21 -05:00
Strings.cpp clang+lld: Improve clang+ld.darwinnew.lld interaction, pass -demangle 2020-11-24 08:51:58 -05:00
TargetOptionsCommandFlags.cpp [AIX] Turn -fdata-sections on by default in Clang 2020-10-14 15:58:31 +00:00
Timer.cpp [LLD] Fix /time formatting for very long runs. NFC. 2020-10-02 09:53:43 -04:00
Version.cpp Remove HAVE_VCS_VERSION_INC, not needed 2020-10-29 13:09:05 -07:00