diff options
| author | Eric Huss <eric@huss.org> | 2022-02-03 07:03:44 -0800 |
|---|---|---|
| committer | Eric Huss <eric@huss.org> | 2022-02-03 07:03:44 -0800 |
| commit | c64d6bf5af368066af7ecc2f69555b1721cfd0b5 (patch) | |
| tree | 73170eff337d9f31761abec2e7225b0ad6f19db9 /compiler/rustc_codegen_llvm/src/llvm_util.rs | |
| parent | e1eff1b0e89bf2350dcf4d7933f1984f2c37c9c4 (diff) | |
| download | rust-c64d6bf5af368066af7ecc2f69555b1721cfd0b5.tar.gz rust-c64d6bf5af368066af7ecc2f69555b1721cfd0b5.zip | |
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.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm_util.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index 437f9a9e4cc..f91fad2d9c9 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -46,7 +46,12 @@ unsafe fn configure_llvm(sess: &Session) { let mut llvm_args = Vec::with_capacity(n_args + 1); 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 { full_arg.trim().split(|c: char| c == '=' || c.is_whitespace()).next().unwrap_or("") |
