rustc built for custom targets requires -Zunstable-options on every invocation
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
When building rustc with support for custom targets, the compiler requires the -Zunstable-options flag not only during the build process but also on every subsequent invocation of the resulting rustc binary.
For e.g., rustc -vV -Zunstable-options
This behavior introduces additional complexity for cross-compilation toolchains (e.g., Yocto Project), where custom targets are distributed as part of the toolchain. End users of such toolchains are required to consistently pass -Zunstable-options, even for basic commands, which reduces usability.
To mitigate this, we are forced to introduce a wrapper script around rustc to automatically inject the -Zunstable-options flag. However, this is not an ideal or maintainable solution.
Can the requirement to pass -Zunstable-options be limited to the build phase and once a rustc binary is built for a custom target, invoking it should not require this flag for standard operations?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the custom-target build and the rustc -vV -Zunstable-options invocation described in the issue. Trace where the flag requirement is enforced for the built rustc, then identify or add coverage for standard operations without the flag. Done means the build phase still works while a resulting custom-target rustc handles standard invocations without -Zunstable-options.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100