[utils/not] Disable coredumps when --crash is passed
We are expecting a crash, so it is unlikely that a coredump is going to be particularly useful. For debugging the program can always be run without the `not --crash` wrapper. Reviewed By: jh7370 Pull Request: https://github.com/llvm/llvm-project/pull/83704
This commit is contained in:
committed by
GitHub
parent
1da5db97cb
commit
53a656d9a4
@@ -11,6 +11,7 @@
|
||||
// not --crash cmd
|
||||
// Will return true if cmd crashes (e.g. for testing crash reporting).
|
||||
|
||||
#include "llvm/Support/Process.h"
|
||||
#include "llvm/Support/Program.h"
|
||||
#include "llvm/Support/WithColor.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
@@ -41,6 +42,9 @@ int main(int argc, const char **argv) {
|
||||
setenv("LLVM_DISABLE_CRASH_REPORT", "1", 0);
|
||||
setenv("LLVM_DISABLE_SYMBOLIZATION", "1", 0);
|
||||
#endif
|
||||
// Try to disable coredumps for expected crashes as well since this can
|
||||
// noticeably slow down running the test suite.
|
||||
sys::Process::PreventCoreFiles();
|
||||
}
|
||||
|
||||
if (argc == 0)
|
||||
|
||||
Reference in New Issue
Block a user