Skip to content

Commit 74ddaa2

Browse files
committed
back: archive: remove dead code
1 parent 5a4c8a9 commit 74ddaa2

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

src/librustc/back/archive.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -87,29 +87,6 @@ impl<'a> Archive<'a> {
8787
Archive { sess: sess, dst: dst }
8888
}
8989

90-
/// Read a file in the archive
91-
pub fn read(&self, file: &str) -> Vec<u8> {
92-
// Apparently if "ar p" is used on windows, it generates a corrupt file
93-
// which has bad headers and LLVM will immediately choke on it
94-
if cfg!(windows) {
95-
let loc = TempDir::new("rsar").unwrap();
96-
let archive = os::make_absolute(&self.dst);
97-
run_ar(self.sess, "x", Some(loc.path()), [&archive,
98-
&Path::new(file)]);
99-
let result: Vec<u8> =
100-
fs::File::open(&loc.path().join(file)).read_to_end()
101-
.unwrap()
102-
.move_iter()
103-
.collect();
104-
result
105-
} else {
106-
run_ar(self.sess,
107-
"p",
108-
None,
109-
[&self.dst, &Path::new(file)]).output.move_iter().collect()
110-
}
111-
}
112-
11390
/// Adds all of the contents of a native library to this archive. This will
11491
/// search in the relevant locations for a library named `name`.
11592
pub fn add_native_library(&mut self, name: &str) -> io::IoResult<()> {

0 commit comments

Comments
 (0)