diff --git a/packages/cli/src/cli/link.rs b/packages/cli/src/cli/link.rs index e51f78ab2..bbf5cd1f6 100644 --- a/packages/cli/src/cli/link.rs +++ b/packages/cli/src/cli/link.rs @@ -129,6 +129,10 @@ impl LinkAction { handle_linker_command_file(&mut args); + if self.triple.environment == target_lexicon::Environment::Android { + args.retain(|arg| !arg.ends_with(".lib")); + } + // Write the linker args to a file for the main process to read // todo: we might need to encode these as escaped shell words in case newlines are passed std::fs::write(&self.link_args_file, args.join("\n"))?;