Add check step, stuck on 'no output generated for libgoto_def-hash rmeta'
This commit is contained in:
parent
0f2266d3cc
commit
9cf485c3db
@ -621,6 +621,7 @@ macro_rules! describe {
|
|||||||
check::Clippy,
|
check::Clippy,
|
||||||
check::Miri,
|
check::Miri,
|
||||||
check::Rls,
|
check::Rls,
|
||||||
|
check::RustAnalyzer,
|
||||||
check::Rustfmt,
|
check::Rustfmt,
|
||||||
check::Bootstrap
|
check::Bootstrap
|
||||||
),
|
),
|
||||||
|
@ -301,6 +301,65 @@ fn run(self, builder: &Builder<'_>) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||||
|
pub struct RustAnalyzer {
|
||||||
|
pub target: TargetSelection,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Step for RustAnalyzer {
|
||||||
|
type Output = ();
|
||||||
|
const ONLY_HOSTS: bool = true;
|
||||||
|
const DEFAULT: bool = true;
|
||||||
|
|
||||||
|
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||||
|
run.paths(&["src/tools/rust-analyzer"])
|
||||||
|
}
|
||||||
|
|
||||||
|
fn make_run(run: RunConfig<'_>) {
|
||||||
|
run.builder.ensure(RustAnalyzer { target: run.target });
|
||||||
|
}
|
||||||
|
|
||||||
|
fn run(self, builder: &Builder<'_>) {
|
||||||
|
let compiler = builder.compiler(builder.top_stage, builder.config.build);
|
||||||
|
let target = self.target;
|
||||||
|
|
||||||
|
builder.ensure(Std { target });
|
||||||
|
|
||||||
|
let mut cargo = prepare_tool_cargo(
|
||||||
|
builder,
|
||||||
|
compiler,
|
||||||
|
Mode::ToolStd,
|
||||||
|
target,
|
||||||
|
cargo_subcommand(builder.kind),
|
||||||
|
"src/tools/rust-analyzer",
|
||||||
|
SourceType::InTree,
|
||||||
|
&["rust-analyzer/in-rust-tree".to_owned()],
|
||||||
|
);
|
||||||
|
|
||||||
|
cargo.rustflag(
|
||||||
|
"-Zallow-features=proc_macro_internals,proc_macro_diagnostic,proc_macro_span",
|
||||||
|
);
|
||||||
|
|
||||||
|
// For ./x.py clippy, don't run with --all-targets because
|
||||||
|
// linting tests and benchmarks can produce very noisy results
|
||||||
|
if builder.kind != Kind::Clippy {
|
||||||
|
cargo.arg("--all-targets");
|
||||||
|
}
|
||||||
|
|
||||||
|
builder.info(&format!(
|
||||||
|
"Checking stage{} {} artifacts ({} -> {})",
|
||||||
|
builder.top_stage, "rust-analyzer", &compiler.host.triple, target.triple
|
||||||
|
));
|
||||||
|
run_cargo(builder, cargo, args(builder), &stamp(builder, compiler, target), vec![], true);
|
||||||
|
|
||||||
|
/// Cargo's output path in a given stage, compiled by a particular
|
||||||
|
/// compiler for the specified target.
|
||||||
|
fn stamp(builder: &Builder<'_>, compiler: Compiler, target: TargetSelection) -> PathBuf {
|
||||||
|
builder.cargo_out(compiler, Mode::ToolStd, target).join(".rust-analyzer-check.stamp")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
macro_rules! tool_check_step {
|
macro_rules! tool_check_step {
|
||||||
($name:ident, $path:literal, $($alias:literal, )* $source_type:path $(, $default:literal )?) => {
|
($name:ident, $path:literal, $($alias:literal, )* $source_type:path $(, $default:literal )?) => {
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||||
|
Loading…
Reference in New Issue
Block a user