Skip to content

Commit 268939a

Browse files
authored
Support the x86_64-linux-android build target. (#127)
* Initial support for x86_64-linux-android targets. * Improve target selection for clang link phase. * Only add clang target if it differs from the host.
1 parent f58cf19 commit 268939a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

xbuild/src/cargo/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,9 @@ impl CargoBuild {
295295
target_sdk_version
296296
);
297297
self.use_ld("lld");
298-
self.add_link_arg("--target=aarch64-linux-android");
298+
if let Some(triple) = self.triple {
299+
self.add_link_arg(&format!("--target={}", triple));
300+
}
299301
self.add_link_arg(&format!("-B{}", sdk_lib_dir.display()));
300302
self.add_link_arg(&format!("-L{}", sdk_lib_dir.display()));
301303
self.add_link_arg(&format!("-L{}", lib_dir.display()));

0 commit comments

Comments
 (0)