Skip to content

Commit abdd24a

Browse files
committed
Remove dropping of loaded plugins and better debug info
1 parent f454aab commit abdd24a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/rustc_codegen_llvm/src/llvm_util.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use rustc_target::spec::{MergeFunctions, PanicStrategy};
1212
use std::ffi::{CStr, CString};
1313
use tracing::debug;
1414

15+
use std::mem;
1516
use std::path::Path;
1617
use std::ptr;
1718
use std::slice;
@@ -136,9 +137,10 @@ unsafe fn configure_llvm(sess: &Session) {
136137
let path = Path::new(plugin);
137138
let res = DynamicLibrary::open(path);
138139
match res {
139-
Ok(_) => debug!("configure_llvm: {}", plugin),
140+
Ok(_) => debug!("LLVM plugin loaded succesfully {} ({})", path.display(), plugin),
140141
Err(e) => bug!("couldn't load plugin: {}", e),
141142
}
143+
mem::forget(res);
142144
}
143145

144146
rustc_llvm::initialize_available_targets();

0 commit comments

Comments
 (0)