/* Attempt to ensure that any outputs are flushed e.g. that .sarif
files are written out.
Only do it once. */
- static bool finishing_due_to_ice = false;
- if (!finishing_due_to_ice)
+ static char **saved_argv = nullptr;
+ if (!saved_argv)
{
- finishing_due_to_ice = true;
+ saved_argv = m_original_argv;
+ m_original_argv = nullptr;
finish ();
}
if (m_abort_on_error)
real_abort ();
+ bool space = false;
+ for (auto *argv = saved_argv; *argv; space = true)
+ fnotice (stderr, &" %s"[1 - space], *argv++);
+ fnotice (stderr, "\n");
+ freeargv (saved_argv);
+
if (m_report_bug)
fnotice (stderr, "Please submit a full bug report, "
"with preprocessed source.\n");