WIP: Add a general mechanism for setting rustflags in Cargo for the current crate only#11046
Closed
ridwanabdillahi wants to merge 2 commits into
Closed
WIP: Add a general mechanism for setting rustflags in Cargo for the current crate only#11046ridwanabdillahi wants to merge 2 commits into
ridwanabdillahi wants to merge 2 commits into
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @weihanglo (or someone else) soon. Please see the contribution instructions for more information. |
…ies to the current crate. Add tests to ensure `--rustflags` options are only set for the current crate and not any dependencies.
6aa4ac8 to
208a7ad
Compare
Contributor
|
☔ The latest upstream changes (presumably #11243) made this pull request unmergeable. Please resolve the merge conflicts. |
Contributor
|
#3310 has been postponed and this PR is a couple years stale. I'm closing this. Once we have a design, work can continue to move forward with a PR, picking p from this whatever is relevant. |
bradyjeong
pushed a commit
to bradyjeong/bevy-gta-clone
that referenced
this pull request
Jul 18, 2025
Oracle identified that the macOS doctest issue is due to dynamic library loading problems where rustdoc-generated test binaries can't find dylibs at runtime. This is a known limitation (cargo#11046) particularly complex with bevy_dylib. Changes: - Skip doctests on macOS in pre-commit script and CI with clear messaging - Add references to upstream issue rust-lang/cargo#11046 - Static linking approach failed due to bevy_dylib dependency conflicts - DYLD_FALLBACK_LIBRARY_PATH approach also failed due to SIP restrictions - Skipping is the most pragmatic approach for v0.4.0-alpha release This preserves doctest coverage on Linux/Windows while unblocking the release. Once upstream fixes are available, we can re-enable macOS doctests. Amp-Thread: https://ampcode.com/threads/T-3d4d1413-9669-48e0-b7cc-8d5a8f20ee96 Co-authored-by: Amp <amp@ampcode.com>
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.
What does this PR try to resolve?
This PR implements RFC #3310, adding a general mechanism for setting rustflags that only apply to the root crate.
How should we test and review this PR?
This change contains tests at
tests/testsuite/rustflags.rsto ensure the new feature works as expected and that rustflags are only where expected.Additional information
None.