From a4ed5bfa3f2850395e38cab67b157d3e6ffa56f8 Mon Sep 17 00:00:00 2001 From: Gemingyang Date: Fri, 29 Nov 2024 01:33:42 +0000 Subject: [PATCH] 1 --- openblas-build/src/build.rs | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/openblas-build/src/build.rs b/openblas-build/src/build.rs index 9fc8634..bce0406 100644 --- a/openblas-build/src/build.rs +++ b/openblas-build/src/build.rs @@ -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() @@ -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() {