-ddump-json doesn't interact as expected with -ddump-to-file
Usually with dump flags, if you set ddump-to-file
then the dumped file will be outputted in the current directory if -dumpdir
or -ddump-file-prefix
is not set. This doesn't work with -ddump-json
, if you do not specify
-ddump-file-prefix
then the output is always on stdout.
Clearly stated, here are the two problems which I think have the same solution.
-
-ddump-to-file -ddump-json
should output a file in the currect directory. -
-ddump-to-file -ddump-json
does not respect-dumpdir
It seems that a stale set of DynFlags is used to direct the output of -ddump-json
. The relevant function is DynFlags.jsonLogFinaliser
.
Trac metadata
Trac field | Value |
---|---|
Version | 8.2.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |