Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 7 pull requests #130109

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
893413d
Add a run-make test for checking that certain `rustc_` crates build o…
Kobzol Aug 24, 2024
7957140
inhibit proc-macro2 nightly detection
lqd Aug 24, 2024
d9794a9
run test in tmp dir and emit artifacts there
lqd Aug 24, 2024
2190c28
remove use of RUSTC_BOOTSTRAP and cargo nightly features
lqd Aug 25, 2024
0577035
separate the crates to test from the test setup
lqd Aug 25, 2024
f1df0c5
remove unneeded type ascription
lqd Aug 25, 2024
a178559
address review comments
lqd Sep 2, 2024
7dd1be1
Also emit `missing_docs` lint with `--test` to fulfill expectations
Urgau Sep 6, 2024
f6d2cfc
Add missing `#[allow(missing_docs)]` on hack functions in alloc
Urgau Sep 6, 2024
ae661dd
Don't emit `missing_docs` lint with dummy spans
Urgau Sep 6, 2024
5f367bb
Make `download-ci-llvm = true` check if CI llvm is available
Urgau Aug 23, 2024
c0b0627
Rename variant `AddrOfRegion` of `RegionVariableOrigin` to `BorrowReg…
gurry Sep 7, 2024
f7d4da6
remove 'const' from 'Option::iter'
RalfJung Sep 7, 2024
cfe85a3
Fixes typo in wasm32-wasip2 doc comment
zslayton Sep 7, 2024
ec11001
run-make-support: Add llvm-pdbutil
nebulark Sep 6, 2024
548d1b9
Rollup merge of #129473 - Urgau:fix-llvm-if-unchanged, r=onur-ozkan
matthiaskrgr Sep 8, 2024
381ac10
Rollup merge of #129529 - lqd:stable-new-solver, r=Kobzol
matthiaskrgr Sep 8, 2024
5e39f04
Rollup merge of #130025 - Urgau:missing_docs-expect, r=petrochenkov
matthiaskrgr Sep 8, 2024
16dadb8
Rollup merge of #130048 - nebulark:runmake_llvm_pdbutil, r=jieyouxu
matthiaskrgr Sep 8, 2024
0d0c4dd
Rollup merge of #130070 - gurry:rename-regionkind-addof-to-ref, r=com…
matthiaskrgr Sep 8, 2024
07778a1
Rollup merge of #130087 - RalfJung:option-const-iter, r=workingjubilee
matthiaskrgr Sep 8, 2024
d4e2ba4
Rollup merge of #130092 - zslayton:master, r=jieyouxu
matthiaskrgr Sep 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add a run-make test for checking that certain rustc_ crates build o…
…n stable
  • Loading branch information
Kobzol authored and lqd committed Aug 26, 2024
commit 893413de5b3e574cee9e2e2cc36524a485b9ea83
7 changes: 7 additions & 0 deletions src/tools/run-make-support/src/external_deps/cargo.rs
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"))
}
1 change: 1 addition & 0 deletions src/tools/run-make-support/src/external_deps/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
//! such as `cc` or `python`.

pub mod c_build;
pub mod cargo;
pub mod cc;
pub mod clang;
pub mod htmldocck;
Expand Down
7 changes: 5 additions & 2 deletions src/tools/run-make-support/src/external_deps/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,13 @@ pub struct Rustc {

crate::macros::impl_common_helpers!(Rustc);

pub fn rustc_path() -> String {
env_var("RUSTC")
}

#[track_caller]
fn setup_common() -> Command {
let rustc = env_var("RUSTC");
let mut cmd = Command::new(rustc);
let mut cmd = Command::new(rustc_path());
set_host_rpath(&mut cmd);
cmd
}
Expand Down
4 changes: 3 additions & 1 deletion src/tools/run-make-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ pub use external_deps::{c_build, cc, clang, htmldocck, llvm, python, rustc, rust
// These rely on external dependencies.
pub use cc::{cc, cxx, extra_c_flags, extra_cxx_flags, Cc};
pub use c_build::{build_native_dynamic_lib, build_native_static_lib, build_native_static_lib_optimized, build_native_static_lib_cxx};
pub use cargo::cargo;
pub use clang::{clang, Clang};
pub use htmldocck::htmldocck;
pub use llvm::{
Expand All @@ -56,7 +57,7 @@ pub use llvm::{
LlvmProfdata, LlvmReadobj,
};
pub use python::python_command;
pub use rustc::{aux_build, bare_rustc, rustc, Rustc};
pub use rustc::{aux_build, bare_rustc, rustc, rustc_path, Rustc};
pub use rustdoc::{bare_rustdoc, rustdoc, Rustdoc};

/// [`diff`][mod@diff] is implemented in terms of the [similar] library.
Expand Down Expand Up @@ -96,3 +97,4 @@ pub use assertion_helpers::{
pub use string::{
count_regex_matches_in_files_with_extension, invalid_utf8_contains, invalid_utf8_not_contains,
};
use crate::external_deps::cargo;
35 changes: 35 additions & 0 deletions tests/run-make/rustc-crates-on-stable/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//! 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)
let cargo = cargo()
// This is required to allow using nightly cargo features (public-dependency) with beta
// cargo
.env("RUSTC_BOOTSTRAP", "1")
.env("RUSTC", rustc_path())
.arg("build")
.arg("--manifest-path")
.arg(source_root().join("Cargo.toml"))
.args(&[
"--config",
r#"workspace.exclude=["library/core"]"#,
// We want to disallow all nightly features, to simulate a stable build
// public-dependency needs to be enabled for cargo to work
"-Zallow-features=public-dependency",
// Avoid depending on transitive rustc crates
"--no-default-features",
// Check that these crates can be compiled on "stable"
"-p",
"rustc_type_ir",
"-p",
"rustc_next_trait_solver",
"-p",
"rustc_pattern_analysis",
"-p",
"rustc_lexer",
])
.run();
}