Skip to content

Commit 2fe3a41

Browse files
authored
Switch from the r option on ar to q (rust-lang#569)
The `r` option means "add the object while replacing it if it already exists", while the `q` option says "always add to the end". We actually want the latter of these due to how this crate works because we're always building archives from scratch, and we always want all our objects to go in the archive instead of trying to replace previous versions. This should fix a recent issue with rust-lang#564 where previously if everything was in one giant command line `ar` would append two files but now afterwards with multiple invocations the second invocation may overwrite files added in the first invocation. Closes rust-lang#568
1 parent 6a7c07c commit 2fe3a41

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/lib.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1859,7 +1859,7 @@ impl Build {
18591859
for flag in self.ar_flags.iter() {
18601860
ar.arg(flag);
18611861
}
1862-
run(ar.arg("crs").arg(dst).args(objs), &cmd)?;
1862+
run(ar.arg("cqs").arg(dst).args(objs), &cmd)?;
18631863
}
18641864

18651865
Ok(())

0 commit comments

Comments
 (0)