Skip to content

Commit 2fe3a41

Browse files
authored
Switch from the r option on ar to q (#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 #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 #568
1 parent 6a7c07c commit 2fe3a41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)