FLOWGRAPH_PRINT_LOANS,
FLOWGRAPH_PRINT_MOVES,
FLOWGRAPH_PRINT_ASSIGNS,
- FLOWGRAPH_PRINT_ALL
+ FLOWGRAPH_PRINT_ALL,
+ PRINT_SYSROOT
]
0
)
pub fn debugging_opts_map() -> Vec<(&'static str, &'static str, u64)> {
- vec!(("verbose", "in general, enable more debug printouts", VERBOSE),
+ vec![("verbose", "in general, enable more debug printouts", VERBOSE),
("time-passes", "measure time of each rustc pass", TIME_PASSES),
("count-llvm-insns", "count where LLVM \
instrs originate", COUNT_LLVM_INSNS),
("flowgraph-print-assigns", "Include assignment analysis data in \
--pretty flowgraph output", FLOWGRAPH_PRINT_ASSIGNS),
("flowgraph-print-all", "Include all dataflow analysis data in \
- --pretty flowgraph output", FLOWGRAPH_PRINT_ALL))
+ --pretty flowgraph output", FLOWGRAPH_PRINT_ALL),
+ ("print-sysroot", "Print the sysroot as used by this rustc invocation",
+ PRINT_SYSROOT)]
}
#[deriving(Clone)]
describe_lints(&ls, false);
return;
}
+
+ let sess = build_session(sopts, None, descriptions);
+ if sess.debugging_opt(config::PRINT_SYSROOT) {
+ println!("{}", sess.sysroot().display());
+ return;
+ }
+
early_error("no input filename given");
}
1u => {