diff options
| author | Andy Russell <arussell123@gmail.com> | 2023-01-15 13:43:15 -0500 |
|---|---|---|
| committer | Andy Russell <arussell123@gmail.com> | 2023-03-20 13:19:35 -0400 |
| commit | bb7c373fdf6c7c3fb8e204dcc178d870644fcc4b (patch) | |
| tree | 32094fdb49a0bb37a86af2e10f3189c9070cf513 /compiler/rustc_driver_impl | |
| parent | 13b7aa4d7faafbed78d195c27f6868f6bd90c2f8 (diff) | |
| download | rust-bb7c373fdf6c7c3fb8e204dcc178d870644fcc4b.tar.gz rust-bb7c373fdf6c7c3fb8e204dcc178d870644fcc4b.zip | |
migrate compiler, bootstrap, and compiletest to windows-rs
Diffstat (limited to 'compiler/rustc_driver_impl')
| -rw-r--r-- | compiler/rustc_driver_impl/Cargo.toml | 7 | ||||
| -rw-r--r-- | compiler/rustc_driver_impl/src/lib.rs | 8 |
2 files changed, 8 insertions, 7 deletions
diff --git a/compiler/rustc_driver_impl/Cargo.toml b/compiler/rustc_driver_impl/Cargo.toml index 7b59a52cffe..73a1f79a020 100644 --- a/compiler/rustc_driver_impl/Cargo.toml +++ b/compiler/rustc_driver_impl/Cargo.toml @@ -54,8 +54,11 @@ rustc_hir_analysis = { path = "../rustc_hir_analysis" } [target.'cfg(unix)'.dependencies] libc = "0.2" -[target.'cfg(windows)'.dependencies] -winapi = { version = "0.3", features = ["consoleapi", "debugapi", "processenv"] } +[target.'cfg(windows)'.dependencies.windows] +version = "0.46.0" +features = [ + "Win32_System_Diagnostics_Debug", +] [features] llvm = ['rustc_interface/llvm'] diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index 555917c8b5e..8634c644176 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -1246,11 +1246,9 @@ pub fn report_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) { interface::try_print_query_stack(&handler, num_frames); #[cfg(windows)] - unsafe { - if env::var("RUSTC_BREAK_ON_ICE").is_ok() { - // Trigger a debugger if we crashed during bootstrap - winapi::um::debugapi::DebugBreak(); - } + if env::var("RUSTC_BREAK_ON_ICE").is_ok() { + // Trigger a debugger if we crashed during bootstrap + unsafe { windows::Win32::System::Diagnostics::Debug::DebugBreak() }; } } |
