chore: disable Android Rust build tasks on Linux arm64 hosts

This commit is contained in:
Kingkor Roy Tirtho 2026-10-18 23:49:34 +06:00
parent b333c299d1
commit 2f7eb742cf

View File

@ -543,3 +543,14 @@ cargo {
embedRustLibrary = (rustTarget == GobleyHost.current.rustTarget) embedRustLibrary = (rustTarget == GobleyHost.current.rustTarget)
} }
} }
// Google only ships x86_64 Linux NDK toolchains, so on a Linux arm64 host the Android Rust targets can never
// link (clang: "Exec format error"). Desktop packaging doesn't need them; Android is built on x86_64 runners.
run {
val isLinuxArm64Host = System.getProperty("os.name").lowercase().contains("linux") &&
System.getProperty("os.arch").lowercase() in setOf("aarch64", "arm64")
if (isLinuxArm64Host) {
tasks.matching { it.name.startsWith("cargoBuildAndroid") || it.name.startsWith("rustUpTargetAddAndroid") }
.configureEach { enabled = false }
}
}