From d9208665b5eef883c025f44717f8c76afa871a94 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Sun, 30 Aug 2020 22:17:24 -0400 Subject: Add `-Z proc-macro-backtrace` to allow showing proc-macro panics Fixes #75050 Previously, we would unconditionally suppress the panic hook during proc-macro execution. This commit adds a new flag -Z proc-macro-backtrace, which allows running the panic hook for easier debugging. --- compiler/rustc_session/src/options.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compiler/rustc_session') diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index d05f1a3f34b..82330d9a533 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -967,6 +967,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, "print the result of the monomorphization collection pass"), print_type_sizes: bool = (false, parse_bool, [UNTRACKED], "print layout information for each type encountered (default: no)"), + proc_macro_backtrace: bool = (false, parse_bool, [UNTRACKED], + "show backtraces for panics during proc-macro execution (default: no)"), profile: bool = (false, parse_bool, [TRACKED], "insert profiling code (default: no)"), profile_emit: Option = (None, parse_opt_pathbuf, [TRACKED], -- cgit 1.4.1-3-g733a5