You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
482 B
16 lines
482 B
fn main() {
|
|
if cfg!(feature = "x64") || cfg!(feature = "arm64") || cfg!(feature = "all-arch") {
|
|
return;
|
|
}
|
|
|
|
let arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap();
|
|
|
|
if arch == "x86_64" {
|
|
println!("cargo:rustc-cfg=feature=\"x64\"");
|
|
} else if arch == "aarch64" {
|
|
println!("cargo:rustc-cfg=feature=\"arm64\"");
|
|
} else {
|
|
println!("cargo:rustc-cfg=feature=\"{arch}\"");
|
|
}
|
|
println!("cargo:rerun-if-changed=build.rs");
|
|
}
|
|
|