about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2021-03-19 15:03:28 +0100
committerGitHub <noreply@github.com>2021-03-19 15:03:28 +0100
commit23128c41839fda23548da1cb16730de87d703ea6 (patch)
treec1abb2d081f63307c17226baed99b7d3dd081457 /compiler/rustc_codegen_ssa
parent827ad66801ad83666192bfbda2de538dc87a710c (diff)
parent458d044c5be4d86d39de894f7051bb023e2c2c40 (diff)
downloadrust-23128c41839fda23548da1cb16730de87d703ea6.tar.gz
rust-23128c41839fda23548da1cb16730de87d703ea6.zip
Rollup merge of #83236 - cjgillot:memmap, r=joshtriplett
Upgrade memmap to memmap2

memmap is no longer maintained. memmap2 is a fork that is still maintained. https://rustsec.org/advisories/RUSTSEC-2020-0077.html

The remaining use of memmap is through measureme.
Diffstat (limited to 'compiler/rustc_codegen_ssa')
-rw-r--r--compiler/rustc_codegen_ssa/Cargo.toml2
-rw-r--r--compiler/rustc_codegen_ssa/src/back/lto.rs2
-rw-r--r--compiler/rustc_codegen_ssa/src/back/write.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_ssa/Cargo.toml b/compiler/rustc_codegen_ssa/Cargo.toml
index 5e2f01b2c9d..15dbbbd49aa 100644
--- a/compiler/rustc_codegen_ssa/Cargo.toml
+++ b/compiler/rustc_codegen_ssa/Cargo.toml
@@ -11,7 +11,7 @@ test = false
 bitflags = "1.2.1"
 cc = "1.0.1"
 itertools = "0.9"
-memmap = "0.7"
+memmap2 = "0.2.1"
 tracing = "0.1"
 libc = "0.2.50"
 jobserver = "0.1.11"
diff --git a/compiler/rustc_codegen_ssa/src/back/lto.rs b/compiler/rustc_codegen_ssa/src/back/lto.rs
index 0d7f4447696..c6aea22a63e 100644
--- a/compiler/rustc_codegen_ssa/src/back/lto.rs
+++ b/compiler/rustc_codegen_ssa/src/back/lto.rs
@@ -93,7 +93,7 @@ impl<B: WriteBackendMethods> LtoModuleCodegen<B> {
 pub enum SerializedModule<M: ModuleBufferMethods> {
     Local(M),
     FromRlib(Vec<u8>),
-    FromUncompressedFile(memmap::Mmap),
+    FromUncompressedFile(memmap2::Mmap),
 }
 
 impl<M: ModuleBufferMethods> SerializedModule<M> {
diff --git a/compiler/rustc_codegen_ssa/src/back/write.rs b/compiler/rustc_codegen_ssa/src/back/write.rs
index 854aaac757f..490b3d33112 100644
--- a/compiler/rustc_codegen_ssa/src/back/write.rs
+++ b/compiler/rustc_codegen_ssa/src/back/write.rs
@@ -1958,7 +1958,7 @@ pub fn submit_pre_lto_module_to_llvm<B: ExtraBackendMethods>(
         .unwrap_or_else(|e| panic!("failed to open bitcode file `{}`: {}", bc_path.display(), e));
 
     let mmap = unsafe {
-        memmap::Mmap::map(&file).unwrap_or_else(|e| {
+        memmap2::Mmap::map(&file).unwrap_or_else(|e| {
             panic!("failed to mmap bitcode file `{}`: {}", bc_path.display(), e)
         })
     };