diff options
| author | jyn <github@jyn.dev> | 2023-07-11 22:53:23 -0500 |
|---|---|---|
| committer | jyn <github@jyn.dev> | 2023-07-11 22:55:23 -0500 |
| commit | d52eb4f99aebfb1077063c9e65c365e550eb1fb2 (patch) | |
| tree | 81f33f1878efa63c9878581f20d44e745647f057 /compiler/rustc_driver_impl/src | |
| parent | 993deaa0bf8bab9dd3eadfd1fbeb093328e95afe (diff) | |
| download | rust-d52eb4f99aebfb1077063c9e65c365e550eb1fb2.tar.gz rust-d52eb4f99aebfb1077063c9e65c365e550eb1fb2.zip | |
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.
Diffstat (limited to 'compiler/rustc_driver_impl/src')
| -rw-r--r-- | compiler/rustc_driver_impl/src/lib.rs | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index 2e26ce111f0..25c043149e8 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -279,9 +279,6 @@ fn run_compiler( let sopts = config::build_session_options(&mut early_error_handler, &matches); - // Set parallel mode before thread pool creation, which will create `Lock`s. - interface::set_thread_safe_mode(&sopts.unstable_opts); - if let Some(ref code) = matches.opt_str("explain") { handle_explain(&early_error_handler, diagnostics_registry(), code, sopts.color); return Ok(()); |
