lld-link: Let LLD_REPRODUCE control /reproduce:, like in ld.lld
authorNico Weber <thakis@chromium.org>
Fri, 27 Nov 2020 18:33:55 +0000 (13:33 -0500)
committerNico Weber <thakis@chromium.org>
Fri, 27 Nov 2020 18:33:55 +0000 (13:33 -0500)
commita0994cbe2799bf4ec5bc6d72b4fb1e0fe638972f
treeb6ab7890f07691c118853b56459766669e45d1da
parenta4b80efea98fc0b6421db40f9718c5c369fecec0
lld-link: Let LLD_REPRODUCE control /reproduce:, like in ld.lld

Also sync help texts for the option between elf and coff ports.

Decisions:
- Do this even if /lldignoreenv is passed. /reproduce: does not affect
  the main output, and this makes the env var more convenient to use.
  (On the other hand, it's now possible to set this env var and forget
  about it, and all future builds in the same shell will be much slower.
  That's true for ld.lld, but posix shells have an easy way to set an
  env var for a single command; in cmd.exe this is not possible without
  contortions. Then again, lld-link runs in posix shells too.)

Original patch rebased across D68378 and D68381.

Differential Revision: https://reviews.llvm.org/D67707
lld/COFF/Driver.cpp
lld/COFF/Options.td
lld/ELF/Options.td
lld/test/COFF/linkrepro.test