diff --git a/build.rs b/build.rs index a83dc9a2..779ec2e2 100644 --- a/build.rs +++ b/build.rs @@ -1,14 +1,5 @@ #[cfg(not(feature = "binary"))] -fn main() { - #[cfg(target_arch = "x86")] - compile_error!( - "This crate currently does not support 32-bit protected mode. \ - See https://github.com/rust-osdev/bootloader/issues/70 for more information." - ); - - #[cfg(not(any(target_arch = "x86_64", target_arch = "x86")))] - compile_error!("This crate only supports the x86_64 architecture."); -} +fn main() {} #[cfg(feature = "binary")] #[derive(Default)] diff --git a/src/lib.rs b/src/lib.rs index 00d3d069..90d8eebf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,6 +12,15 @@ pub use crate::bootinfo::BootInfo; pub mod bootinfo; +#[cfg(target_arch = "x86")] +compile_error!( + "This crate currently does not support 32-bit protected mode. \ + See https://github.com/rust-osdev/bootloader/issues/70 for more information." +); + +#[cfg(not(any(target_arch = "x86_64", target_arch = "x86")))] +compile_error!("This crate only supports the x86_64 architecture."); + /// Defines the entry point function. /// /// The function must have the signature `fn(&'static BootInfo) -> !`.