Skip to content

Commit d12d316

Browse files
committed
rustc_driver: add -Z pretty-keep-going to continue compilation after pretty-printing.
1 parent d4945b4 commit d12d316

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/librustc/session/config.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
580580
"Include assignment analysis data in --pretty flowgraph output"),
581581
flowgraph_print_all: bool = (false, parse_bool,
582582
"Include all dataflow analysis data in --pretty flowgraph output"),
583+
pretty_keep_going: bool = (false, parse_bool,
584+
"Do not stop after pretty-printing (use with --pretty)"),
583585
print_region_graph: bool = (false, parse_bool,
584586
"Prints region inference graph. \
585587
Use with RUST_REGION_GRAPH=help for more info"),

src/librustc_driver/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,10 @@ impl<'a> CompilerCalls<'a> for RustcDefaultCalls {
342342
let output = state.output;
343343
pretty::print_from_phase(state, ppm, opt_uii.as_ref(), output).unwrap();
344344
};
345-
phase.stop = Compilation::Stop;
345+
346+
if !sess.opts.debugging_opts.pretty_keep_going {
347+
phase.stop = Compilation::Stop;
348+
}
346349
}
347350

348351
if self.save_analysis {

0 commit comments

Comments
 (0)