1
Fork 0

migrate compiler, bootstrap, and compiletest to windows-rs

This commit is contained in:
Andy Russell 2023-01-15 13:43:15 -05:00
parent 13b7aa4d7f
commit bb7c373fdf
No known key found for this signature in database
GPG key ID: BE2221033EDBC374
22 changed files with 381 additions and 282 deletions

View file

@ -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']

View file

@ -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() };
}
}