fix(cli): correct Android toolchain target for 32-bit arm architectures (#4837)

* fix(cli): correct Android toolchain target for 32-bit arm architectures

* style: rustfmt
This commit is contained in:
Koji AGAWA authored and GitHub committed 2025-10-27 12:40:39 -07:00
1 parent 9b52aa6607
commit ddeeb540fc
1 file changed
+9 -2
+9 -2
View File
@@ -163,8 +163,13 @@ impl AndroidTools {
""
};
let target = match triple.architecture {
Architecture::Arm(_) => "armv7a-linux-androideabi",
_ => &triple.to_string(),
};
self.android_tools_dir()
.join(format!("{}{}-clang{}", triple, sdk_version, suffix))
.join(format!("{}{}-clang{}", target, sdk_version, suffix))
}
pub(crate) fn sysroot(&self) -> PathBuf {
@@ -247,7 +252,9 @@ impl AndroidTools {
match output {
Ok(Ok(out)) => match out.trim() {
"armv7l" => triple.architecture = Architecture::Arm(ArmArchitecture::Arm),
"armv7l" | "armv8l" => {
triple.architecture = Architecture::Arm(ArmArchitecture::Arm)
}
"aarch64" => {
triple.architecture = Architecture::Aarch64(Aarch64Architecture::Aarch64)
}