Build rust-analyzer proc-macro server by default

This allows getting rid of some documentation and an extra step when building a custom toolchain: https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html#creating-a-rustup-toolchain
and it seems likely that people will want to do this if they want rustdoc (which is also built by default).
This commit is contained in:
Joshua Nelson 2022-12-08 07:59:05 -06:00
parent 7632db0e87
commit 11798660ac

View File

@ -747,19 +747,9 @@ impl Step for RustAnalyzerProcMacroSrv {
const ONLY_HOSTS: bool = true;
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
let builder = run.builder;
// Allow building `rust-analyzer-proc-macro-srv` both as part of the `rust-analyzer` and as a stand-alone tool.
run.path("src/tools/rust-analyzer")
.path("src/tools/rust-analyzer/crates/proc-macro-srv-cli")
.default_condition(
builder.config.extended
&& builder.config.tools.as_ref().map_or(true, |tools| {
tools.iter().any(|tool| {
tool == "rust-analyzer" || tool == "rust-analyzer-proc-macro-srv"
})
}),
)
}
fn make_run(run: RunConfig<'_>) {