diff --git a/build.rs b/build.rs index 87081628..1a2473f1 100644 --- a/build.rs +++ b/build.rs @@ -243,6 +243,13 @@ mod binary { if manifest .get("dependencies") .and_then(|d| d.get("bootloader")) + .or_else(|| { + manifest + .get("target") + .and_then(|table| table.get(r#"cfg(target_arch = "x86_64")"#)) + .and_then(|table| table.get("dependencies")) + .and_then(|table| table.get("bootloader")) + }) .is_some() { // it seems to be the correct Cargo.toml diff --git a/tests/test_kernels/map_phys_mem/Cargo.toml b/tests/test_kernels/map_phys_mem/Cargo.toml index e87d20be..7a86b592 100644 --- a/tests/test_kernels/map_phys_mem/Cargo.toml +++ b/tests/test_kernels/map_phys_mem/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Philipp Oppermann "] edition = "2018" -[dependencies] +[target.'cfg(target_arch = "x86_64")'.dependencies] bootloader = { path = "../../.." } x86_64 = { version = "0.13.2", default-features = false, features = ["instructions", "inline_asm"] } uart_16550 = "0.2.10"