Fix regression: remove --target when targeting Android on non-Windows platforms#991
Merged
NobodyXu merged 1 commit intorust-lang:mainfrom Mar 5, 2024
Merged
Fix regression: remove --target when targeting Android on non-Windows platforms#991NobodyXu merged 1 commit intorust-lang:mainfrom
--target when targeting Android on non-Windows platforms#991NobodyXu merged 1 commit intorust-lang:mainfrom
Conversation
Contributor
Author
|
FYI, @NobodyXu @ChrisDenton |
--target when targetting Android on non-Windows platforms--target when targeting Android on non-Windows platforms
NobodyXu
approved these changes
Mar 5, 2024
Contributor
NobodyXu
left a comment
There was a problem hiding this comment.
Seems good to me.
Is there anyway of preventing such breakage by adding regression tests?
dc99b07 to
c00f513
Compare
Contributor
Author
Added. |
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 |
Contributor
|
Created release, waiting for publish |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
--targetargument 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
--targetwas being passed on non-Windows platforms, which broke thecompile-uitests for the Rust compiler when building forarm-android: rust-lang/rust#121854 (comment)This fix restores the original logic AND respects the new
has_internal_target_argflag (regardless if we're targeting Android or not).I've verified that the
arm-androidbuild succeeds with this change: https://github.com/rust-lang/rust/actions/runs/8146073082/job/22263762750?pr=121874Fixes #990