diff options
| author | Aaron Hill <aa1ronham@gmail.com> | 2020-08-30 22:17:24 -0400 |
|---|---|---|
| committer | Aaron Hill <aa1ronham@gmail.com> | 2020-08-30 22:17:24 -0400 |
| commit | d9208665b5eef883c025f44717f8c76afa871a94 (patch) | |
| tree | 176013005f76e7122dcf00a1de9a9a0d20e9db47 /compiler/rustc_session | |
| parent | 36b0d7e25769e88fec85e1d073196065a7f2d7c4 (diff) | |
| download | rust-d9208665b5eef883c025f44717f8c76afa871a94.tar.gz rust-d9208665b5eef883c025f44717f8c76afa871a94.zip | |
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.
Diffstat (limited to 'compiler/rustc_session')
| -rw-r--r-- | compiler/rustc_session/src/options.rs | 2 |
1 files changed, 2 insertions, 0 deletions
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<PathBuf> = (None, parse_opt_pathbuf, [TRACKED], |
