about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCorey Richardson <corey@octayn.net>2014-04-01 10:16:46 -0400
committerCorey Richardson <corey@octayn.net>2014-04-01 10:16:46 -0400
commit74ddaa27e759c1b00cf1e369d17bec4be5c16aee (patch)
treee717f26dc02558fcb02fc417d3b519db4be56170
parent5a4c8a9c5764bf323f55f94603453dffbba6b1cc (diff)
back: archive: remove dead code
-rw-r--r--src/librustc/back/archive.rs23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/librustc/back/archive.rs b/src/librustc/back/archive.rs
index d6173176c16..6de7bb59b61 100644
--- a/src/librustc/back/archive.rs
+++ b/src/librustc/back/archive.rs
@@ -87,29 +87,6 @@ impl<'a> Archive<'a> {
         Archive { sess: sess, dst: dst }
     }
 
-    /// Read a file in the archive
-    pub fn read(&self, file: &str) -> Vec<u8> {
-        // Apparently if "ar p" is used on windows, it generates a corrupt file
-        // which has bad headers and LLVM will immediately choke on it
-        if cfg!(windows) {
-            let loc = TempDir::new("rsar").unwrap();
-            let archive = os::make_absolute(&self.dst);
-            run_ar(self.sess, "x", Some(loc.path()), [&archive,
-                                                      &Path::new(file)]);
-            let result: Vec<u8> =
-                fs::File::open(&loc.path().join(file)).read_to_end()
-                                                      .unwrap()
-                                                      .move_iter()
-                                                      .collect();
-            result
-        } else {
-            run_ar(self.sess,
-                   "p",
-                   None,
-                   [&self.dst, &Path::new(file)]).output.move_iter().collect()
-        }
-    }
-
     /// Adds all of the contents of a native library to this archive. This will
     /// search in the relevant locations for a library named `name`.
     pub fn add_native_library(&mut self, name: &str) -> io::IoResult<()> {