Skip to content

fix(cli): filter out .lib files when targeting Android #4130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fontlos
Copy link
Contributor

@fontlos fontlos commented May 16, 2025

This PR fixes a case that during multi-platform builds (e.g., when simultaneously targeting Windows and Android), Windows-specific .lib files from dependencies like embed_resource are incorrectly included in Android linker arguments, despite proper #[cfg(windows)] guards in both build.rs and Cargo.toml

When building for Android, the linker may incorrectly pick up Windows-specific
.lib files (e.g., from embed-resource) even with proper #[cfg] guards in build.rs.
This explicitly filters out .lib files from linker arguments when the target
environment is Android to prevent linkage failures.
@fontlos fontlos requested a review from a team as a code owner May 16, 2025 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant