Skip to content

Commit c64d6bf

Browse files
committed
Only disable dialogs on CI.
The "CI" environment var isn't universal (for example, I think Azure uses TF_BUILD). However, we are mostly concerned with rust-lang/rust's own CI which currently is GitHub Actions which does set "CI". And I think most other providers use "CI" as well.
1 parent e1eff1b commit c64d6bf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

compiler/rustc_codegen_llvm/src/llvm_util.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ unsafe fn configure_llvm(sess: &Session) {
4646
let mut llvm_args = Vec::with_capacity(n_args + 1);
4747

4848
llvm::LLVMRustInstallFatalErrorHandler();
49-
llvm::LLVMRustDisableSystemDialogsOnCrash();
49+
// On Windows, an LLVM assertion will open an Abort/Retry/Ignore dialog
50+
// box for the purpose of launching a debugger. However, on CI this will
51+
// cause it to hang until it times out, which can take several hours.
52+
if std::env::var_os("CI").is_some() {
53+
llvm::LLVMRustDisableSystemDialogsOnCrash();
54+
}
5055

5156
fn llvm_arg_to_arg_name(full_arg: &str) -> &str {
5257
full_arg.trim().split(|c: char| c == '=' || c.is_whitespace()).next().unwrap_or("")

0 commit comments

Comments
 (0)