-
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.
Auto merge of #10539 - Urgau:check-cfg-build-script, r=ehuss
Add unstable `rustc-check-cfg` build script output This PR adds a new build script output as unstable behind `-Zcheck-cfg=output`: `rustc-check-cfg`. ### What does this PR try to resolve? This PR add a way to add to use the unstable `--check-cfg` command line option of `rustc` and `rustdoc`. It was discover in [Bump bootstrap compiler to 1.61.0 beta](rust-lang/rust#95678 (comment)) that `rustc_llvm` sets some custom `cfg` from a build script and because `--check-cfg=values()` is globally enable in the Rust codebase that cause the compilation to fail. For now no values are checked in stage 0 for the entire codebase which is a shame and should be fixed with the addition of this feature. ### How should we test and review this PR? Commits are separated in: implementation, tests and doc. Testing should simply be done by adding a valid `cargo:rustc-check-cfg` in a build script. Watch the added tests or doc to have an example. ### Additional information This PR is also the logical next step after `-Zcheck-cfg-features`.
- Loading branch information
Showing
7 changed files
with
289 additions
and
36 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
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
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
Oops, something went wrong.