-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cargo-rustc): give trailing flags higher precedence
Previously `cargo rustc -- <flags>` got a lower precedence than some of the flags set by cargo internal. This is a bit unintuitive as Cargo generally treats user-provided CLI flags with the highest priority. This commit changes `cargo rustc -- <flags>` to a higher precedence: higher than most of flags set by Cargo, and only lower than `build.rustflags` family. Unsure if this affects people's workflow, so this behavior is only enabled on nightly for collectin feedback. A environment variable `__CARGO_RUSTC_ORIG_ARGS_PRIO=1` is provided for users to opt-out. If everything goes well, the nightly gate will be removed after a few of releases. See discussion on https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/rustflags.20precendence.20of.20.60cargo.20rustc.60
- Loading branch information
Showing
2 changed files
with
39 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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