about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-10-19 21:38:41 +0200
committerGitHub <noreply@github.com>2022-10-19 21:38:41 +0200
commite85def73b54a3b4614980d5d3e74a2cfa94b8a57 (patch)
tree3e677484cf5c466b6dda2b4174cf05386ab52c47
parent12775ce16a4449c0f04cbce14efc56ac8d9ed39a (diff)
parent5b7bd2fed899b7966a09a6d5552a2e1985bc7526 (diff)
downloadrust-e85def73b54a3b4614980d5d3e74a2cfa94b8a57.tar.gz
rust-e85def73b54a3b4614980d5d3e74a2cfa94b8a57.zip
Rollup merge of #103246 - ferrocene:pa-rust-analyzer-hosts, r=Mark-Simulacrum
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.

The problem can be reproduced by running:

```
./x build src/tools/rust-analyzer --target x86_64-unknown-linux-gnu,aarch64-unknown-none
```
-rw-r--r--src/bootstrap/tool.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
index d6e7f787270..eec74b2675a 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<PathBuf>;
     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<PathBuf>;
     const DEFAULT: bool = true;
-    const ONLY_HOSTS: bool = false;
+    const ONLY_HOSTS: bool = true;
 
     fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
         let builder = run.builder;