[llvm] [CMake] Options to control generation of reproducers (PR #143037)
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 5 15:15:52 PDT 2025
petrhosek wrote:
> > we don't provide any control over the reproducers (whether to generate them only for compiler crashes or linker crashes as well) or their location
>
> Not to dissuade you from this patch (which I think is great!), but FWIW, you can set the `CLANG_CRASH_DIAGNOSTICS_DIR` environment variable, and clang will dump crash reproducers in that path. This is great for CI, especially in non-llvm projects.
That's what we [use for our Clang builders](https://fuchsia.googlesource.com/infra/recipes/+/refs/heads/main/recipes/contrib/clang_toolchain.py#961) at the moment but we're currently investigating a regression in LLD that only manifests on our Mac builders and results in a crash and we need a way to set `-fcrash-diagnostics=all` (in the runtimes subbuild) which motivated this change (and I hope would be generally useful).
The alternative would be to introduce additional environment variables such as `CLANG_CRASH_DIAGNOSTICS` and `CLANG_GEN_REPRODUCER` that correspond to the existing options.
https://github.com/llvm/llvm-project/pull/143037
More information about the llvm-commits
mailing list