Don't require each rustc_interface tool to opt-in to parallel_rustc support
Previously, forgetting to call `interface::set_thread_safe_mode` would cause the following ICE: ``` thread 'rustc' panicked at 'uninitialized dyn_thread_safe mode!', /rustc/dfe0683138de0959b6ab6a039b54d9347f6a6355/compiler/rustc_data_structures/src/sync.rs:74:18 ``` This calls `set_thread_safe_mode` in `interface::run_compiler` to avoid requiring it in the caller. Fixes `tests/run-make-fulldeps/issue-19371` when parallel-compiler is enabled.
This commit is contained in:
parent
993deaa0bf
commit
d52eb4f99a
4 changed files with 5 additions and 12 deletions
|
@ -744,9 +744,6 @@ fn main_args(handler: &mut EarlyErrorHandler, at_args: &[String]) -> MainResult
|
|||
}
|
||||
};
|
||||
|
||||
// Set parallel mode before error handler creation, which will create `Lock`s.
|
||||
interface::set_thread_safe_mode(&options.unstable_opts);
|
||||
|
||||
let diag = core::new_handler(
|
||||
options.error_format,
|
||||
None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue