From 5b7bd2fed899b7966a09a6d5552a2e1985bc7526 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Wed, 19 Oct 2022 14:33:17 +0200 Subject: [PATCH] mark rust-analyzer as a host-only tool All tools meant to be shipped with host toolchains only should be marked as `ONLY_HOSTS = true`, but rust-analyzer was marked as `ONLY_HOSTS = false` incorrectly. This meant that bootstrap attempted to build rust-analyzer for cross-compilation-only targets, causing errors because libstd is not present on some of them. It will still be possible to cross-compile rust-analyzer by passing a different --host flag to ./x, like you can cross-compile other tools. --- src/bootstrap/tool.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs index d6e7f7872703e..eec74b2675a1e 100644 --- a/src/bootstrap/tool.rs +++ b/src/bootstrap/tool.rs @@ -698,7 +698,7 @@ pub struct RustAnalyzer { impl Step for RustAnalyzer { type Output = Option; const DEFAULT: bool = true; - const ONLY_HOSTS: bool = false; + const ONLY_HOSTS: bool = true; fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { let builder = run.builder; @@ -742,7 +742,7 @@ pub struct RustAnalyzerProcMacroSrv { impl Step for RustAnalyzerProcMacroSrv { type Output = Option; const DEFAULT: bool = true; - const ONLY_HOSTS: bool = false; + const ONLY_HOSTS: bool = true; fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { let builder = run.builder;