|
1 | 1 | //! Checks if selected rustc crates can be compiled on the stable channel (or a "simulation" of it). |
2 | 2 | //! These crates are designed to be used by downstream users. |
3 | 3 |
|
4 | | -use run_make_support::{cargo,run_in_tmpdir,rustc_path, source_root}; |
| 4 | +use run_make_support::{cargo, rustc_path, source_root}; |
5 | 5 |
|
6 | 6 | fnmain(){ |
7 | | -run_in_tmpdir(|| { |
8 | | -// Use the stage0 beta cargo for the compilation (it shouldn't really matter which cargo we |
9 | | -// use) |
10 | | -let cargo = cargo() |
11 | | -// Ensure `proc-macro2`'s nightly detection is disabled |
12 | | -.env("RUSTC_STAGE","0") |
13 | | -.env("RUSTC",rustc_path()) |
14 | | -// We want to disallow all nightly features to simulate a stable build |
15 | | -.env("RUSTFLAGS","-Zallow-features=") |
16 | | -.arg("build") |
17 | | -.arg("--manifest-path") |
18 | | -.arg(source_root().join("Cargo.toml")) |
19 | | -.args(&[ |
20 | | -"--config", |
21 | | -r#"workspace.exclude=["library/core"]"#, |
22 | | -// Avoid depending on transitive rustc crates |
23 | | -"--no-default-features", |
24 | | -// Emit artifacts in this temporary directory, not in the source_root's `target` |
25 | | -// folder |
26 | | -"--target-dir", |
27 | | -".", |
28 | | -]) |
29 | | -// Check that these crates can be compiled on "stable" |
30 | | -.args(&[ |
31 | | -"-p", |
32 | | -"rustc_type_ir", |
33 | | -"-p", |
34 | | -"rustc_next_trait_solver", |
35 | | -"-p", |
36 | | -"rustc_pattern_analysis", |
37 | | -"-p", |
38 | | -"rustc_lexer", |
39 | | -]) |
40 | | -.run(); |
41 | | -}); |
| 7 | +// Use the stage0 beta cargo for the compilation (it shouldn't really matter which cargo we use) |
| 8 | +cargo() |
| 9 | +// Ensure `proc-macro2`'s nightly detection is disabled |
| 10 | +.env("RUSTC_STAGE","0") |
| 11 | +.env("RUSTC",rustc_path()) |
| 12 | +// We want to disallow all nightly features to simulate a stable build |
| 13 | +.env("RUSTFLAGS","-Zallow-features=") |
| 14 | +.arg("build") |
| 15 | +.arg("--manifest-path") |
| 16 | +.arg(source_root().join("Cargo.toml")) |
| 17 | +.args(&[ |
| 18 | +// Avoid depending on transitive rustc crates |
| 19 | +"--no-default-features", |
| 20 | +// Emit artifacts in this temporary directory, not in the source_root's `target` folder |
| 21 | +"--target-dir", |
| 22 | +"target", |
| 23 | +]) |
| 24 | +// Check that these crates can be compiled on "stable" |
| 25 | +.args(&[ |
| 26 | +"-p", |
| 27 | +"rustc_type_ir", |
| 28 | +"-p", |
| 29 | +"rustc_next_trait_solver", |
| 30 | +"-p", |
| 31 | +"rustc_pattern_analysis", |
| 32 | +"-p", |
| 33 | +"rustc_lexer", |
| 34 | +]) |
| 35 | +.run(); |
42 | 36 | } |
0 commit comments