Skip to content

Commit e0450fa

Browse files
committed
Use OUT_DIR instead of CARGO_MANIFEST_DIR to expand tar.gz
1 parent a93816b commit e0450fa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

openblas-src/build.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,13 @@ fn build() {
160160
);
161161
}
162162

163-
let source =
164-
PathBuf::from(env!("CARGO_MANIFEST_DIR")).join(format!("OpenBLAS-{}", OPENBLAS_VERSION));
163+
let source = output.join(format!("OpenBLAS-{}", OPENBLAS_VERSION));
165164
if !source.exists() {
165+
let crate_root = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
166166
Command::new("tar")
167167
.arg("xf")
168-
.arg(format!("OpenBLAS-{}.tar.gz", OPENBLAS_VERSION))
169-
.current_dir(env!("CARGO_MANIFEST_DIR"))
168+
.arg(crate_root.join(format!("OpenBLAS-{}.tar.gz", OPENBLAS_VERSION)))
169+
.current_dir(&output)
170170
.status()
171171
.expect("tar command not found");
172172
}

0 commit comments

Comments
 (0)