compiler_wrapper: add autocrash logic

As outlined in the attached bug, we want to be able to crash the
compiler based on a handful of heuristics. Crashing Clang helps get us
self-contained reproducers fairly easily.

This CL provides (off-by-default) functionality to do the above. The
expectation is that a SWE will hack at it to make it work as they need
to.

BUG=b:236736327
TEST=Installed the new wrapper; observed autocrashes.

Change-Id: I76ec753ec37baa5e9b6dab92668081fa7c605725
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3714885
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Commit-Queue: George Burgess <gbiv@chromium.org>
Tested-by: George Burgess <gbiv@chromium.org>
5 files changed