message: Move output argument from ArchiveBuilder::new to .build()
diff: @@ -19,7 +19,6 @@ enum ArchiveEntry {
  pub(crate) struct ArArchiveBuilder<'a> {
  sess: &'a Session,
  - dst: PathBuf,
  use_gnu_style_archive: bool,
  no_builtin_ranlib: bool,
  @@ -30,10 +29,9 @@ pub(crate) struct ArArchiveBuilder<'a> {
  }
  impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> {
  - fn new(sess: &'a Session, output: &Path) -> Self {
  + fn new(sess: &'a Session) -> Self {
  ArArchiveBuilder {
  sess,
  - dst: output.to_path_buf(),
  use_gnu_style_archive: sess.target.archive_format == "gnu",
  // FIXME fix builtin ranlib on macOS
  no_builtin_ranlib: sess.target.is_like_osx,
  @@ -74,7 +72,7 @@ fn add_archive<F>(&mut self, archive_path: &Path, mut skip: F) -> std::io::Resul
  Ok(())
  }
  - fn build(mut self) -> bool {
  + fn build(mut self, output: &Path) -> bool {
  enum BuilderKind {
  Bsd(ar::Builder<File>),
  Gnu(ar::GnuBuilder<File>),
  @@ -163,7 +161,7 @@ enum BuilderKind {
  let mut builder = if self.use_gnu_style_archive {
  BuilderKind::Gnu(
  ar::GnuBuilder::new(
  - File::create(&self.dst).unwrap_or_else(|err| {
  + File::create(output).unwrap_or_else(|err| {
  sess.fatal(&format!(
  "error opening destination during archive building: {}",
  err
  @@ -178,7 +176,7 @@ enum BuilderKind {
  } else {
  BuilderKind::Bsd(
  ar::Builder::new(
  - File::create(&self.dst).unwrap_or_else(|err| {
  + File::create(output).unwrap_or_else(|err| {
  sess.fatal(&format!(
  "error opening destination during archive building: {}",
  err
  @@ -209,7 +207,7 @@ enum BuilderKind {
  // Run ranlib to be able to link the archive
  let status = std::process::Command::new(ranlib)
  - .arg(self.dst)
  + .arg(output)
  .status()
  .expect("Couldn't run ranlib");
  