-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.rs
More file actions
25 lines (20 loc) · 760 Bytes
/
build.rs
File metadata and controls
25 lines (20 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use std::path::PathBuf;
#[cfg(all(
feature = "nightly-features",
target_arch = "x86_64",
target_feature = "avx512f"
))]
fn main() {
// Tell rustc where the Go‑built library lives
let lib_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.join("native")
.join("libs");
println!("cargo:rustc-link-search=native={}", lib_dir.display());
// Link against libsis_amd64.so (if you have libsis_amd64.a, change to static)
println!("cargo:rustc-link-lib=dylib=sis_amd64");
// Linux convenience: embed rpath so tests/binaries find the .so at runtime
#[cfg(target_os = "linux")]
println!("cargo:rustc-link-arg=-Wl,-rpath,$ORIGIN/../native/lib");
}
#[cfg(all(not(target_feature = "avx512f")))]
fn main() {}