Shield rerun-if-changed under the feature flags so
that cargo watch doesn't cause re-build every iteration.
This commit is contained in:
parent
26b99d3f85
commit
cb0f19e4f1
9
build.rs
9
build.rs
|
@ -3,8 +3,6 @@ use std::fs;
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("cargo:rerun-if-changed=target/perf-libs");
|
|
||||||
println!("cargo:rerun-if-changed=target/perf-libs/libcuda-crypt.a");
|
|
||||||
println!("cargo:rerun-if-changed=build.rs");
|
println!("cargo:rerun-if-changed=build.rs");
|
||||||
|
|
||||||
// Ensure target/perf-libs/ exists. It's been observed that
|
// Ensure target/perf-libs/ exists. It's been observed that
|
||||||
|
@ -63,9 +61,14 @@ fn main() {
|
||||||
assert!(status.success());
|
assert!(status.success());
|
||||||
}
|
}
|
||||||
if chacha || cuda || erasure {
|
if chacha || cuda || erasure {
|
||||||
|
println!("cargo:rerun-if-changed=target/perf-libs");
|
||||||
println!("cargo:rustc-link-search=native=target/perf-libs");
|
println!("cargo:rustc-link-search=native=target/perf-libs");
|
||||||
}
|
}
|
||||||
|
if chacha {
|
||||||
|
println!("cargo:rerun-if-changed=target/perf-libs/libcpu-crypt.a");
|
||||||
|
}
|
||||||
if cuda {
|
if cuda {
|
||||||
|
println!("cargo:rerun-if-changed=target/perf-libs/libcuda-crypt.a");
|
||||||
println!("cargo:rustc-link-lib=static=cuda-crypt");
|
println!("cargo:rustc-link-lib=static=cuda-crypt");
|
||||||
println!("cargo:rustc-link-search=native=/usr/local/cuda/lib64");
|
println!("cargo:rustc-link-search=native=/usr/local/cuda/lib64");
|
||||||
println!("cargo:rustc-link-lib=dylib=cudart");
|
println!("cargo:rustc-link-lib=dylib=cudart");
|
||||||
|
@ -73,6 +76,8 @@ fn main() {
|
||||||
println!("cargo:rustc-link-lib=dylib=cudadevrt");
|
println!("cargo:rustc-link-lib=dylib=cudadevrt");
|
||||||
}
|
}
|
||||||
if erasure {
|
if erasure {
|
||||||
|
println!("cargo:rerun-if-changed=target/perf-libs/libgf_complete.so");
|
||||||
|
println!("cargo:rerun-if-changed=target/perf-libs/libJerasure.so");
|
||||||
println!("cargo:rustc-link-lib=dylib=Jerasure");
|
println!("cargo:rustc-link-lib=dylib=Jerasure");
|
||||||
println!("cargo:rustc-link-lib=dylib=gf_complete");
|
println!("cargo:rustc-link-lib=dylib=gf_complete");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue