[Driver] Re-run lld with --reproduce when it crashes
authorAlex Brachet <abrachet@google.com>
Mon, 1 Aug 2022 19:59:45 +0000 (19:59 +0000)
committerAlex Brachet <abrachet@google.com>
Mon, 1 Aug 2022 20:01:01 +0000 (20:01 +0000)
commit5fd03b00ee029b4cc958ae8e6c970a6123bd12f6
treee73390cfe986d25cbabddfa0471301c7bec1398a
parent51bda3a0e7ac0285cf116b5cfd1393a3340974b5
[Driver] Re-run lld with --reproduce when it crashes

This was discussed on https://discourse.llvm.org/t/rfc-generating-lld-reproducers-on-crashes/58071/12

When lld crashes, or errors when -gen-reproducer=error
and -fcrash-diagnostics=all clang will re-run lld with
--reproduce=$temp_file for easily reproducing the
crash/error.

Differential Revision: https://reviews.llvm.org/D120175
clang/docs/UsersManual.rst
clang/include/clang/Driver/Compilation.h
clang/include/clang/Driver/Driver.h
clang/include/clang/Driver/Options.td
clang/lib/Driver/Driver.cpp
clang/test/Driver/crash-report.cpp
clang/test/Driver/lit.local.cfg
clang/test/Driver/lld-repro.c [new file with mode: 0644]