Skip to content

Commit 5ebcaa1

Browse files
committed
fix: also check cfg gated field for bootloader dependency
1 parent bc6c1bd commit 5ebcaa1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

build.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,15 @@ mod binary {
242242

243243
if manifest
244244
.get("dependencies")
245-
.and_then(|d| d.get("bootloader"))
245+
.and_then(|d| {
246+
d.get("bootloader").or_else(|| {
247+
manifest
248+
.get("target")
249+
.and_then(|table| table.get(r#"cfg(target_arch = "x86_64")"#))
250+
.and_then(|table| table.get("dependencies"))
251+
.and_then(|table| table.get("bootloader"))
252+
})
253+
})
246254
.is_some()
247255
{
248256
// it seems to be the correct Cargo.toml

0 commit comments

Comments
 (0)