Skip to content

Commit 1a17c63

Browse files
committed
Use compile_error to fail compilation for wrong target
1 parent 7861cac commit 1a17c63

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
#![no_std]
88
#![no_main]
99

10+
#[cfg(not(target_os = "none"))]
11+
compile_error!("The bootloader crate must be compiled for the `x86_64-bootloader.json` target");
12+
1013
use bootloader::bootinfo::{BootInfo, FrameRange};
1114
use core::panic::PanicInfo;
1215
use core::{mem, slice};

0 commit comments

Comments
 (0)