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 Aug 15, 2023
1 parent d560591 commit 484436a
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 @@ -298,7 +298,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 484436a

Please sign in to comment.