summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2022-01-27 16:53:17 -0800
committerEric Huss <eric@huss.org>2022-01-27 16:53:17 -0800
commite1eff1b0e89bf2350dcf4d7933f1984f2c37c9c4 (patch)
tree621b20c36e43fddc9fc121beaabb245c1c5f5d1a /compiler/rustc_codegen_llvm/src
parent21b4a9cfdcbb1e76f4b36b5c3cfd64d627285093 (diff)
downloadrust-e1eff1b0e89bf2350dcf4d7933f1984f2c37c9c4.tar.gz
rust-e1eff1b0e89bf2350dcf4d7933f1984f2c37c9c4.zip
Windows: Disable LLVM crash dialog boxes.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm/ffi.rs1
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm_util.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
index 2b102188790..367c86a1dc9 100644
--- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
@@ -987,6 +987,7 @@ pub type SelfProfileAfterPassCallback = unsafe extern "C" fn(*mut c_void);
 
 extern "C" {
     pub fn LLVMRustInstallFatalErrorHandler();
+    pub fn LLVMRustDisableSystemDialogsOnCrash();
 
     // Create and destroy contexts.
     pub fn LLVMRustContextCreate(shouldDiscardNames: bool) -> &'static mut Context;
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs
index d49df29f453..437f9a9e4cc 100644
--- a/compiler/rustc_codegen_llvm/src/llvm_util.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs
@@ -46,6 +46,7 @@ unsafe fn configure_llvm(sess: &Session) {
     let mut llvm_args = Vec::with_capacity(n_args + 1);
 
     llvm::LLVMRustInstallFatalErrorHandler();
+    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("")