Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirreke committed Nov 29, 2024
1 parent dd80d86 commit a4ed5bf
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions openblas-build/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,29 +460,9 @@ impl Configure {

// Copy OpenBLAS sources from this crate to `out_dir`
let root = openblas_root.as_ref();
for entry in WalkDir::new(root) {
let entry = entry.expect("Unknown IO error while walkdir");
let dest = out_dir.join(
entry
.path()
.strip_prefix(root)
.expect("Directory entry is not under root"),
);
if dest.exists() {
// Do not overwrite
// Cache of previous build should be cleaned by `cargo clean`
continue;
}
if entry.file_type().is_dir() {
fs::create_dir(&dest)?;
}
if entry.file_type().is_file() {
fs::copy(entry.path(), &dest)?;
}
}

match Command::new("make")
.current_dir(out_dir)
.current_dir(root)
.args(["all", "BINARY=64"])
.env_remove("TARGET")
.check_call()
Expand All @@ -497,7 +477,7 @@ impl Configure {
match Command::new("make")
.arg("install")
.arg(format!("PREFIX={}", out_dir.display()))
.current_dir(out_dir)
.current_dir(root)
.env_remove("TARGET")
.check_call()
{
Expand Down

0 comments on commit a4ed5bf

Please sign in to comment.