Romain Malmain a0e30d01d3
QEMU: safe linking of extern "C" declarations (#1810)
* safe linking initial commit

* Fix static declaration.

* Works also for static variables, even for thread-unsafe types.

* Remove warnings.

* fixed visibility for function.

* remove `rustversion` from dependencies.
2024-01-23 22:38:06 +01:00

21 lines
405 B
Rust

mod host_specific {
#[cfg(target_os = "linux")]
include!("build_linux.rs");
#[cfg(not(target_os = "linux"))]
pub fn build() {
println!("cargo:warning=libafl_qemu only builds on Linux hosts");
}
}
#[rustversion::nightly]
fn main() {
println!("cargo:rustc-cfg=nightly");
host_specific::build();
}
#[rustversion::not(nightly)]
fn main() {
host_specific::build();
}