Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a263358

Browse filesBrowse files
committed
Make the entry_point macro only available on x86_64
Inline assembly causes build errors on other architectures. We can still run the config tests on other architectures, so we don't want to set the `target_arch` for the entire crate.
1 parent 074e17a commit a263358
Copy full SHA for a263358

File tree

Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed

‎api/src/lib.rs

Copy file name to clipboardExpand all lines: api/src/lib.rs
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ mod version_info {
106106
/// `#[link_section = ".bootloader-config"]`, which instructs the Rust compiler to store it
107107
/// in a special section of the resulting ELF executable. From there, the bootloader will
108108
/// automatically read it when loading the kernel.
109+
#[cfg(target_arch = "x86_64")]
109110
#[macro_export]
110111
macro_rules! entry_point {
111112
($path:path) => {
@@ -139,6 +140,7 @@ macro_rules! entry_point {
139140
}
140141

141142
#[doc(hidden)]
143+
#[cfg(target_arch = "x86_64")]
142144
pub fn __force_use(slice: &&[u8; BootloaderConfig::SERIALIZED_LEN]) {
143145
let force_use = slice as *const _ as usize;
144146
unsafe { core::arch::asm!("add {0}, 0", in(reg) force_use, options(nomem, nostack)) };

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.