feat: support rustflags per profile by zhamlin · Pull Request #10217 · rust-lang...
source link: https://github.com/rust-lang/cargo/pull/10217
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
I think it would be good to also talk about how this works with rustdocflags. If there are flags that are required for correctness, then cargo test --doc
would fail. I'm not suggesting that this should add rustdocflags, though. Just to consider what the impact will be.
I'm a little nervous adding this, as it is a very low-level thing which we haven't exposed in Cargo.toml
before. One of my biggest concerns is that it can cause backward-compatibility hazards. For example, when Cargo adds new features or changes the way it invokes rustc, that can interfere with pre-existing flags. In a sense, this seems to be an end-run around Cargo not exposing the workflows that users want.
I'm not concerned enough to block it, as I can see its utility. However, I think we should tread very carefully.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK