Skip to content

Commit

Permalink
Only add clang target if it differs from the host.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsclary committed Oct 10, 2023
1 parent a74d6b9 commit b10b1dc
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(&format!("--target={}", self.triple.unwrap_or(ndk_triple)));
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 b10b1dc

Please sign in to comment.