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.
This commit is contained in:
parent
e1eff1b0e8
commit
c64d6bf5af
@ -46,7 +46,12 @@ unsafe fn configure_llvm(sess: &Session) {
|
|||||||
let mut llvm_args = Vec::with_capacity(n_args + 1);
|
let mut llvm_args = Vec::with_capacity(n_args + 1);
|
||||||
|
|
||||||
llvm::LLVMRustInstallFatalErrorHandler();
|
llvm::LLVMRustInstallFatalErrorHandler();
|
||||||
llvm::LLVMRustDisableSystemDialogsOnCrash();
|
// On Windows, an LLVM assertion will open an Abort/Retry/Ignore dialog
|
||||||
|
// box for the purpose of launching a debugger. However, on CI this will
|
||||||
|
// cause it to hang until it times out, which can take several hours.
|
||||||
|
if std::env::var_os("CI").is_some() {
|
||||||
|
llvm::LLVMRustDisableSystemDialogsOnCrash();
|
||||||
|
}
|
||||||
|
|
||||||
fn llvm_arg_to_arg_name(full_arg: &str) -> &str {
|
fn llvm_arg_to_arg_name(full_arg: &str) -> &str {
|
||||||
full_arg.trim().split(|c: char| c == '=' || c.is_whitespace()).next().unwrap_or("")
|
full_arg.trim().split(|c: char| c == '=' || c.is_whitespace()).next().unwrap_or("")
|
||||||
|
Loading…
Reference in New Issue
Block a user