[clang] Implement setting crash_diagnostics_dir through env variable
authorMatheus Izvekov <mizvekov@gmail.com>
Thu, 1 Sep 2022 02:17:06 +0000 (04:17 +0200)
committerMatheus Izvekov <mizvekov@gmail.com>
Tue, 6 Sep 2022 17:27:37 +0000 (19:27 +0200)
commit94c6dfbaebbd5b9474794b2437757dfb6aedefc3
treec09a7c8b750cd4ff9d00c82b9395f78feb777b45
parent27e7db54eb2fdb1e29c83b4b0acf90d558eba141
[clang] Implement setting crash_diagnostics_dir through env variable

This implements setting the equivalent of `-fcrash-diagnostics-dir`
through the environment variable `CLANG_CRASH_DIAGNOSTICS_DIR`.
If present, the flag still takes precedence.

This helps integration with test frameworks and pipelines.

With this feature, we change the libcxx bootstrapping build
pipeline to produce clang crash reproducers as artifacts.

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Differential Revision: https://reviews.llvm.org/D133082
clang/docs/ReleaseNotes.rst
clang/docs/UsersManual.rst
clang/lib/Driver/Driver.cpp
clang/test/Driver/crash-diagnostics-dir-3.c [new file with mode: 0644]
libcxx/utils/ci/buildkite-pipeline.yml