From 74ddaa27e759c1b00cf1e369d17bec4be5c16aee Mon Sep 17 00:00:00 2001 From: Corey Richardson Date: Tue, 1 Apr 2014 10:16:46 -0400 Subject: [PATCH] back: archive: remove dead code --- src/librustc/back/archive.rs | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/librustc/back/archive.rs b/src/librustc/back/archive.rs index d6173176c160..6de7bb59b618 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 { - // 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 = - 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<()> {