diff options
| author | bors <bors@rust-lang.org> | 2018-09-05 20:52:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-09-05 20:52:42 +0000 |
| commit | 6e0f1cc1587676b58cfff06bf3a10ea7fba7086e (patch) | |
| tree | 939464c9857d97a2b5a225de0b52ba2ab390626c /src/librustc_codegen_llvm/back | |
| parent | 780b0c7bbfacc56f59a729881b5c95cd2c61ff97 (diff) | |
| parent | fc47a92336c02ee551c72e86ae4d0396895f9535 (diff) | |
| download | rust-6e0f1cc1587676b58cfff06bf3a10ea7fba7086e.tar.gz rust-6e0f1cc1587676b58cfff06bf3a10ea7fba7086e.zip | |
Auto merge of #53962 - michaelwoerister:close-thinlto-file-descriptors, r=alexcrichton
ThinLTO: Don't keep files open after mmaping them. Fixes #53947. r? @alexcrichton
Diffstat (limited to 'src/librustc_codegen_llvm/back')
| -rw-r--r-- | src/librustc_codegen_llvm/back/lto.rs | 6 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/back/write.rs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_codegen_llvm/back/lto.rs b/src/librustc_codegen_llvm/back/lto.rs index c1dda02264e..25bc662c408 100644 --- a/src/librustc_codegen_llvm/back/lto.rs +++ b/src/librustc_codegen_llvm/back/lto.rs @@ -29,7 +29,7 @@ use {ModuleCodegen, ModuleLlvm, ModuleKind}; use libc; use std::ffi::{CStr, CString}; -use std::fs::{self, File}; +use std::fs; use std::ptr; use std::slice; use std::sync::Arc; @@ -619,7 +619,7 @@ fn run_pass_manager(cgcx: &CodegenContext, pub enum SerializedModule { Local(ModuleBuffer), FromRlib(Vec<u8>), - FromUncompressedFile(memmap::Mmap, File), + FromUncompressedFile(memmap::Mmap), } impl SerializedModule { @@ -627,7 +627,7 @@ impl SerializedModule { match *self { SerializedModule::Local(ref m) => m.data(), SerializedModule::FromRlib(ref m) => m, - SerializedModule::FromUncompressedFile(ref m, _) => m, + SerializedModule::FromUncompressedFile(ref m) => m, } } } diff --git a/src/librustc_codegen_llvm/back/write.rs b/src/librustc_codegen_llvm/back/write.rs index 9c586504527..6b257ed4c3e 100644 --- a/src/librustc_codegen_llvm/back/write.rs +++ b/src/librustc_codegen_llvm/back/write.rs @@ -2494,7 +2494,7 @@ pub(crate) fn submit_pre_lto_module_to_llvm(tcx: TyCtxt, // Schedule the module to be loaded drop(tcx.tx_to_llvm_workers.lock().send(Box::new(Message::AddImportOnlyModule { - module_data: SerializedModule::FromUncompressedFile(mmap, file), + module_data: SerializedModule::FromUncompressedFile(mmap), work_product: module.source, }))); } |
