Files
lez-programs/programs/amm/client/build.rs
T

18 lines
562 B
Rust
Raw Normal View History

2026-07-22 13:46:54 -03:00
use std::env;
fn main() {
let Ok(target_os) = env::var("CARGO_CFG_TARGET_OS") else {
return;
};
// RISC Zero's host-side serde dependency contains guest syscall shims with exported C names.
// They are implementation details of this cdylib and would otherwise leak beside the three
// supported amm_client_* entry points.
if matches!(
target_os.as_str(),
"android" | "dragonfly" | "freebsd" | "linux" | "netbsd" | "openbsd"
) {
println!("cargo:rustc-cdylib-link-arg=-Wl,--exclude-libs,ALL");
}
}