Throw error if architecture is not supported

This commit is contained in:
Gary Guo 2021-09-06 23:33:30 +01:00
parent 789082f176
commit 32ad71301c
2 changed files with 15 additions and 0 deletions

View File

@ -51,3 +51,11 @@ mod aarch64 {
}
#[cfg(target_arch = "aarch64")]
pub use aarch64::*;
#[cfg(not(any(
target_arch = "x86_64",
target_arch = "riscv64",
target_arch = "riscv32",
target_arch = "aarch64"
)))]
compile_error!("Current architecture is not supported");

View File

@ -12,3 +12,10 @@ pub use riscv64::*;
mod aarch64;
#[cfg(target_arch = "aarch64")]
pub use aarch64::*;
#[cfg(not(any(
target_arch = "x86_64",
target_arch = "riscv64",
target_arch = "aarch64"
)))]
compile_error!("Current architecture is not supported");