Skip to content

Commit

Permalink
Support the x86_64-linux-android build target. (rust-mobile#127)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
jsclary authored and Athosvk committed Oct 22, 2024
1 parent f3621d8 commit 5825652
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xbuild/src/cargo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,9 @@ impl CargoBuild {
target_sdk_version
);
self.use_ld("lld");
self.add_link_arg("--target=aarch64-linux-android");
if let Some(triple) = self.triple {
self.add_link_arg(&format!("--target={}", triple));
}
self.add_link_arg(&format!("-B{}", sdk_lib_dir.display()));
self.add_link_arg(&format!("-L{}", sdk_lib_dir.display()));
self.add_link_arg(&format!("-L{}", lib_dir.display()));
Expand Down

0 comments on commit 5825652

Please sign in to comment.