This is an archive of the discontinued LLVM Phabricator instance.

Make -fcrash-diagnostics-dir control the Windows (mini-)dump location
ClosedPublic

Authored by probinson on Mar 23 2021, 10:53 AM.

Details

Summary

There's no automated test for this, as I don't see any existing tests for creating minidumps. I have tried it locally, and it works fine even when the directory name has a space in it.

Diff Detail

Event Timeline

probinson created this revision.Mar 23 2021, 10:53 AM
probinson requested review of this revision.Mar 23 2021, 10:53 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 23 2021, 10:53 AM
rnk added a comment.Mar 25 2021, 11:38 AM

Seems reasonable, but I have a concern about the cc1 line being replicable

clang/lib/Driver/ToolChains/Clang.cpp
5159

I guess I would remove this ifdef as well and adjust the comment to indicate that this only controls the location of some kinds of crash dumps for some platforms.

llvm/lib/Support/Signals.cpp
46

I guess the one question I have is, should we have these ifdefs? Thinking about it, we generally want the -cc1 line to be platform independent. You should be able to take a cc1 line from Windows and run it on Linux. That is our typical crash reproduction work flow. With that in mind, I think we need this cl::opt on all platforms, even if it does nothing on Linux.

probinson updated this revision to Diff 333884.Mar 29 2021, 8:28 AM

Remove ifdefs, tweak descriptions/comments.

probinson marked 2 inline comments as done.Mar 29 2021, 8:28 AM

Addressed comments.

rnk accepted this revision.Apr 5 2021, 11:26 AM

lgtm

This revision is now accepted and ready to land.Apr 5 2021, 11:26 AM
This revision was landed with ongoing or failed builds.Apr 6 2021, 9:35 AM
This revision was automatically updated to reflect the committed changes.