Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e1afff0

Browse files
Use a fixed rust-ar
1 parent 49b6395 commit e1afff0

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

‎Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ core = { version = "1.0.0", optional = true, package = 'rustc-std-workspace-core
3333

3434
[build-dependencies]
3535
cc = { optional = true, version = "1.0" }
36-
ar = { optional = true }
36+
ar = { optional = true, path = "../rust-ar" }
3737

3838
[dev-dependencies]
3939
panic-handler = { path = 'crates/panic-handler' }

‎build.rs‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -504,16 +504,6 @@ mod c_system {
504504
r.to_string()
505505
}
506506

507-
// TODO: this really should be part of ar
508-
fn clone_header(h0: &ar::Header) -> ar::Header {
509-
let mut h = ar::Header::new(h0.identifier().to_vec(), h0.size());
510-
h.set_mtime(h0.mtime());
511-
h.set_uid(h0.uid());
512-
h.set_gid(h0.gid());
513-
h.set_mode(h0.mode());
514-
h
515-
}
516-
517507
fn find_library<I>(dirs: I, libname: &str) -> Result<PathBuf, Vec<String>>
518508
where
519509
I: Iterator<Item = PathBuf>
@@ -600,11 +590,9 @@ mod c_system {
600590
},
601591
}
602592
};
603-
orig.jump_to_entry(i).unwrap(); // Work around a stupid rust-ar bug
604593
let mut entry = orig.jump_to_entry(i).unwrap();
605-
let header = clone_header(entry.header());
606594
// TODO: ar really should have an append_entry to avoid the clone
607-
new.append(&header, &mut entry).unwrap();
595+
new.append(&entry.header().clone(), &mut entry).unwrap();
608596
println!("cargo:rustc-cfg={}=\"optimized-c\"", sym);
609597
}
610598

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /