Skip to content
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

Fix regression: remove --target when targeting Android on non-Windows platforms #991

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

dpaoliello
Copy link
Contributor

@dpaoliello dpaoliello commented Mar 4, 2024

The --target argument should not be passed to Clang when targeting Android, as the Android NDK contains wrappers for Clang that automatically set the target.

However, 53564e0 introduced a regression where --target was being passed on non-Windows platforms, which broke the compile-ui tests for the Rust compiler when building for arm-android: rust-lang/rust#121854 (comment)

This fix restores the original logic AND respects the new has_internal_target_arg flag (regardless if we're targeting Android or not).

I've verified that the arm-android build succeeds with this change: https://github.com/rust-lang/rust/actions/runs/8146073082/job/22263762750?pr=121874

Fixes #990

@dpaoliello
Copy link
Contributor Author

FYI, @NobodyXu @ChrisDenton

@dpaoliello dpaoliello changed the title Fix regression: remove --target when targetting Android on non-Windows platforms Fix regression: remove --target when targeting Android on non-Windows platforms Mar 4, 2024
Copy link
Collaborator

@NobodyXu NobodyXu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me.

Is there anyway of preventing such breakage by adding regression tests?

@dpaoliello dpaoliello force-pushed the fixarm branch 4 times, most recently from dc99b07 to c00f513 Compare March 5, 2024 18:53
@dpaoliello
Copy link
Contributor Author

Is there anyway of preventing such breakage by adding regression tests?

Added.

Copy link
Collaborator

@NobodyXu NobodyXu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@NobodyXu NobodyXu merged commit 328f8d8 into rust-lang:main Mar 5, 2024
21 checks passed
@dpaoliello dpaoliello deleted the fixarm branch March 6, 2024 17:09
@dpaoliello
Copy link
Contributor Author

@NobodyXu can we please get a release with this fix, I believe it's the only blocker left to updating cc-rs in the Rust toolchain

@NobodyXu
Copy link
Collaborator

NobodyXu commented Mar 6, 2024

Created release, waiting for publish

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.0.88 breaks the Rust compile-ui tests for arm-android
2 participants