Windows: Disable LLVM crash dialog boxes.
This commit is contained in:
parent
21b4a9cfdc
commit
e1eff1b0e8
3 changed files with 6 additions and 0 deletions
|
@ -987,6 +987,7 @@ pub type SelfProfileAfterPassCallback = unsafe extern "C" fn(*mut c_void);
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
pub fn LLVMRustInstallFatalErrorHandler();
|
pub fn LLVMRustInstallFatalErrorHandler();
|
||||||
|
pub fn LLVMRustDisableSystemDialogsOnCrash();
|
||||||
|
|
||||||
// Create and destroy contexts.
|
// Create and destroy contexts.
|
||||||
pub fn LLVMRustContextCreate(shouldDiscardNames: bool) -> &'static mut Context;
|
pub fn LLVMRustContextCreate(shouldDiscardNames: bool) -> &'static mut Context;
|
||||||
|
|
|
@ -46,6 +46,7 @@ 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();
|
||||||
|
|
||||||
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("")
|
||||||
|
|
|
@ -76,6 +76,10 @@ extern "C" void LLVMRustInstallFatalErrorHandler() {
|
||||||
install_fatal_error_handler(FatalErrorHandler);
|
install_fatal_error_handler(FatalErrorHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" void LLVMRustDisableSystemDialogsOnCrash() {
|
||||||
|
sys::DisableSystemDialogsOnCrash();
|
||||||
|
}
|
||||||
|
|
||||||
extern "C" char *LLVMRustGetLastError(void) {
|
extern "C" char *LLVMRustGetLastError(void) {
|
||||||
char *Ret = LastError;
|
char *Ret = LastError;
|
||||||
LastError = nullptr;
|
LastError = nullptr;
|
||||||
|
|
Loading…
Reference in a new issue