Compare commits
1 Commits
master
...
rei/fix_ni
Author | SHA1 | Date | |
---|---|---|---|
230aa88986 |
@ -14,3 +14,5 @@ links = "whisper"
|
|||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
bindgen = "0.64"
|
bindgen = "0.64"
|
||||||
|
tempfile = "3.3.0"
|
||||||
|
dircpy = "0.3.14"
|
||||||
|
10
sys/build.rs
10
sys/build.rs
@ -57,8 +57,16 @@ fn main() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// copy sources to a temporary directory: in some build systems, the source repo can be read-only
|
||||||
|
// and the makefile compiles files in-place.
|
||||||
|
let temp_build_dir = tempfile::tempdir().expect("failed to acquire temporary directory");
|
||||||
|
dircpy::CopyBuilder::new("whisper.cpp", &temp_build_dir)
|
||||||
|
.with_exclude_filter(".git")
|
||||||
|
.run()
|
||||||
|
.expect("could not copy whisper.cpp to temporary directory");
|
||||||
|
|
||||||
// build libwhisper.a
|
// build libwhisper.a
|
||||||
env::set_current_dir("whisper.cpp").expect("Unable to change directory");
|
env::set_current_dir(&temp_build_dir).expect("Unable to change directory");
|
||||||
let code = std::process::Command::new("make")
|
let code = std::process::Command::new("make")
|
||||||
.arg("libwhisper.a")
|
.arg("libwhisper.a")
|
||||||
.status()
|
.status()
|
||||||
|
Loading…
Reference in New Issue
Block a user