#![no_std]
macro_rules! def_platforms {
(
$(
if $conds:meta {
mod $name:ident = $path:expr;
}
)*
) => {
#[cfg(build_check_all)]
#[path="."]
mod build_all {
$(
#[path="."]
mod $name {
#[path=$path]
mod imp;
#[allow(dead_code)]
mod wrapper;
#[allow(dead_code)]
use self::wrapper::*;
}
)*
}
$(
#[cfg($conds)]
#[path=$path]
mod imp;
)*
}
}
def_platforms! {
if all(target_arch = "x86", target_family = "unix") {
mod x86_unix = "impl-cdecl32.rs";
}
if all(target_arch = "arm", target_family = "unix") {
mod arm_sysv = "impl-cdecl32.rs";
}
if all(
target_arch = "x86_64",
any(target_family = "unix", target_os = "redox", target_os = "tifflin")
) {
mod x8664_elf = "impl-x86_64-elf.rs";
}
if all(any(target_arch = "x86_64", target_arch = "aarch64"), target_family = "windows") {
mod x8664_win64 = "impl-cdecl64.rs";
}
if all(
target_arch = "aarch64",
any(target_family = "unix", target_os = "redox"),
not(any(target_os = "macos", target_os = "ios")), ) {
mod aarch64_elf = "impl-aarch64-elf.rs";
}
if all(target_arch = "riscv64", target_family = "unix") {
mod riscv64_unix = "impl-cdecl64.rs";
}
if all(target_arch = "loongarch64", target_family = "unix") {
mod loongarch64_unix = "impl-cdecl64.rs";
}
if all(target_arch = "aarch64", any(target_os = "macos", target_os = "ios")) {
mod aarch64_macos = "impl-cdecl64.rs";
}
}
mod wrapper;
pub use self::wrapper::*;