Skip to content

Commit

Permalink
refactor(xtask): inline out_dir
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Kröning <[email protected]>
  • Loading branch information
mkroening committed Sep 1, 2023
1 parent 446c6c5 commit 701042c
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions xtask/src/artifact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ impl Artifact {
.unwrap_or_else(|| Path::new("target"))
}

fn out_dir(&self, triple: impl AsRef<Path>) -> PathBuf {
let mut out_dir = self.target_dir().to_path_buf();
out_dir.push(triple);
out_dir.push(self.profile_path_component());
out_dir
}

pub fn builtins_archive(&self) -> Archive {
let mut builtins_archive = self.target_dir().to_path_buf();
builtins_archive.push(self.arch.hermit_triple());
Expand All @@ -60,13 +53,17 @@ impl Artifact {
}

pub fn build_archive(&self) -> Archive {
let mut built_archive = self.out_dir(self.arch.triple());
let mut built_archive = self.target_dir().to_path_buf();
built_archive.push(self.arch.triple());
built_archive.push(self.profile_path_component());
built_archive.push("libhermit.a");
built_archive.into()
}

pub fn dist_archive(&self) -> Archive {
let mut dist_archive = self.out_dir(self.arch.name());
let mut dist_archive = self.target_dir().to_path_buf();
dist_archive.push(self.arch.name());
dist_archive.push(self.profile_path_component());
dist_archive.push("libhermit.a");
dist_archive.into()
}
Expand Down

0 comments on commit 701042c

Please sign in to comment.