Skip to content

Commit

Permalink
Support the x86_64-linux-android build target. (#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 Oct 11, 2023
1 parent f58cf19 commit 268939a
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 @@ -295,7 +295,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 268939a

Please sign in to comment.