diff options
| author | Manuel Drehwald <git@manuel.drehwald.info> | 2021-06-26 19:30:09 +0200 |
|---|---|---|
| committer | Manuel Drehwald <git@manuel.drehwald.info> | 2021-06-26 19:30:09 +0200 |
| commit | abdd24a0404e2ce7c879297da4aa66cf4e64ab79 (patch) | |
| tree | 9f9a2683cbd5f95d35c0bf00683f0f7c2675acf6 /compiler/rustc_codegen_llvm/src | |
| parent | f454aab3d6951aefbdec39fd99b473cfc0579acc (diff) | |
| download | rust-abdd24a0404e2ce7c879297da4aa66cf4e64ab79.tar.gz rust-abdd24a0404e2ce7c879297da4aa66cf4e64ab79.zip | |
Remove dropping of loaded plugins and better debug info
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm_util.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index 52d88df5b3f..cb9c6269b66 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -12,6 +12,7 @@ use rustc_target::spec::{MergeFunctions, PanicStrategy}; use std::ffi::{CStr, CString}; use tracing::debug; +use std::mem; use std::path::Path; use std::ptr; use std::slice; @@ -136,9 +137,10 @@ unsafe fn configure_llvm(sess: &Session) { let path = Path::new(plugin); let res = DynamicLibrary::open(path); match res { - Ok(_) => debug!("configure_llvm: {}", plugin), + Ok(_) => debug!("LLVM plugin loaded succesfully {} ({})", path.display(), plugin), Err(e) => bug!("couldn't load plugin: {}", e), } + mem::forget(res); } rustc_llvm::initialize_available_targets(); |
