forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#129529 - lqd:stable-new-solver, r=Kobzol
Add test to build crates used by r-a on stable r? ```````@Kobzol``````` I've opened other PRs for this one to work and they've landed already. I cherry-picked your commit, and added the last remaining pieces we needed I think.
- Loading branch information
Showing
6 changed files
with
53 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
use crate::command::Command; | ||
use crate::env_var; | ||
|
||
/// Returns a command that can be used to invoke Cargo. | ||
pub fn cargo() -> Command { | ||
Command::new(env_var("BOOTSTRAP_CARGO")) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
//! Checks if selected rustc crates can be compiled on the stable channel (or a "simulation" of it). | ||
//! These crates are designed to be used by downstream users. | ||
|
||
use run_make_support::{cargo, rustc_path, source_root}; | ||
|
||
fn main() { | ||
// Use the stage0 beta cargo for the compilation (it shouldn't really matter which cargo we use) | ||
cargo() | ||
// Ensure `proc-macro2`'s nightly detection is disabled | ||
.env("RUSTC_STAGE", "0") | ||
.env("RUSTC", rustc_path()) | ||
// We want to disallow all nightly features to simulate a stable build | ||
.env("RUSTFLAGS", "-Zallow-features=") | ||
.arg("build") | ||
.arg("--manifest-path") | ||
.arg(source_root().join("Cargo.toml")) | ||
.args(&[ | ||
// Avoid depending on transitive rustc crates | ||
"--no-default-features", | ||
// Emit artifacts in this temporary directory, not in the source_root's `target` folder | ||
"--target-dir", | ||
"target", | ||
]) | ||
// Check that these crates can be compiled on "stable" | ||
.args(&[ | ||
"-p", | ||
"rustc_type_ir", | ||
"-p", | ||
"rustc_next_trait_solver", | ||
"-p", | ||
"rustc_pattern_analysis", | ||
"-p", | ||
"rustc_lexer", | ||
]) | ||
.run(); | ||
} |