Skip to content

Commit 553b13c

Browse files
committed
Don't check target architecture for builder crate to support cross-compiling
1 parent 6df1629 commit 553b13c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ pub mod binary;
9595
#[cfg(feature = "builder")]
9696
pub mod disk_image;
9797

98-
#[cfg(target_arch = "x86")]
98+
#[cfg(all(target_arch = "x86", not(feature = "builder")))]
9999
compile_error!(
100100
"This crate currently does not support 32-bit protected mode. \
101101
See https://github.com/rust-osdev/bootloader/issues/70 for more information."
102102
);
103103

104-
#[cfg(not(any(target_arch = "x86_64", target_arch = "x86")))]
104+
#[cfg(all(not(target_arch = "x86_64"), not(target_arch = "x86"), not(feature = "builder")))]
105105
compile_error!("This crate only supports the x86_64 architecture.");
106106

107107
/// Defines the entry point function.

0 commit comments

Comments
 (0)