2023-10-18 05:14:24 -05:00
|
|
|
macro_rules! arch_specific {
|
|
|
|
{
|
|
|
|
$({$($cfg:tt)*} : $mod:ident;)*
|
2024-02-13 18:25:44 -06:00
|
|
|
} => {
|
|
|
|
$(
|
|
|
|
#[cfg($($cfg)*)]
|
|
|
|
mod $mod;
|
2023-10-18 05:14:24 -05:00
|
|
|
|
2024-02-13 18:25:44 -06:00
|
|
|
#[cfg($($cfg)*)]
|
|
|
|
pub use $mod::*;
|
|
|
|
|
|
|
|
#[cfg($($cfg)*)]
|
|
|
|
pub const FL_ARCH_SPECIFIC_SUPPORTED: bool = true;
|
|
|
|
)*
|
2024-07-08 00:22:53 -05:00
|
|
|
|
2024-02-13 18:25:44 -06:00
|
|
|
#[cfg(not(any($($($cfg)*),*)))]
|
|
|
|
mod unsupported;
|
|
|
|
|
|
|
|
#[cfg(not(any($($($cfg)*),*)))]
|
|
|
|
pub use unsupported::*;
|
|
|
|
|
|
|
|
#[cfg(not(any($($($cfg)*),*)))]
|
|
|
|
pub const FL_ARCH_SPECIFIC_SUPPORTED: bool = false;
|
|
|
|
};
|
2023-10-18 05:14:24 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
arch_specific! {
|
|
|
|
{target_arch = "x86_64" }: x86_64;
|
|
|
|
{target_arch = "riscv64"}: riscv64;
|
|
|
|
{target_arch = "aarch64"}: aarch64;
|
|
|
|
}
|