Tamir Duberstein 6 months ago
parent b603c665a9
commit e4f9ed8d79

@ -9,4 +9,5 @@ fn main() {
let arch = arch.split_once('-').map_or(&*arch, |x| x.0); let arch = arch.split_once('-').map_or(&*arch, |x| x.0);
println!("cargo:rustc-cfg=bpf_target_arch=\"{arch}\""); println!("cargo:rustc-cfg=bpf_target_arch=\"{arch}\"");
} }
println!("cargo::rustc-check-cfg=cfg(bpf_target_arch, values(\"x86_64\",\"arm\",\"aarch64\",\"riscv64\"))");
} }

@ -9,4 +9,6 @@ fn main() {
let arch = arch.split_once('-').map_or(&*arch, |x| x.0); let arch = arch.split_once('-').map_or(&*arch, |x| x.0);
println!("cargo:rustc-cfg=bpf_target_arch=\"{arch}\""); println!("cargo:rustc-cfg=bpf_target_arch=\"{arch}\"");
} }
println!("cargo::rustc-check-cfg=cfg(bpf_target_arch, values(\"x86_64\",\"arm\",\"aarch64\",\"riscv64\"))");
println!("cargo::rustc-check-cfg=cfg(target_arch, values(\"asmjs\",\"nvptx\",\"xtensa\"))");
} }

@ -27,11 +27,8 @@ mod ad {
#[cfg(bpf_target_arch = "riscv64")] #[cfg(bpf_target_arch = "riscv64")]
pub type c_char = super::c_uchar; pub type c_char = super::c_uchar;
#[cfg(any(bpf_target_arch = "x86", bpf_target_arch = "x86_64"))] #[cfg(bpf_target_arch = "x86_64")]
pub type c_char = super::c_schar; pub type c_char = super::c_schar;
#[cfg(all(not(bpf_target_arch), host_arch = "aarch64"))]
pub type c_char = super::c_uchar;
} }
#[cfg(any( #[cfg(any(

@ -10,6 +10,8 @@ fn main() {
let arch = arch.split_once('-').map_or(&*arch, |x| x.0); let arch = arch.split_once('-').map_or(&*arch, |x| x.0);
println!("cargo:rustc-cfg=bpf_target_arch=\"{arch}\""); println!("cargo:rustc-cfg=bpf_target_arch=\"{arch}\"");
} }
println!("cargo::rustc-check-cfg=cfg(bpf_target_arch, values(\"x86_64\",\"arm\",\"aarch64\",\"riscv64\"))");
println!("cargo::rustc-check-cfg=cfg(unstable)");
} }
#[rustversion::nightly] #[rustversion::nightly]

Loading…
Cancel
Save