about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-12-21 16:46:51 +0000
committerbors <bors@rust-lang.org>2023-12-21 16:46:51 +0000
commit23efae075aaf57714e8403572f151491869273fb (patch)
tree8527489233db4fe11bd68e6f686f8b5ac34538b4 /src/bootstrap
parentf36251f689c470aaa81c31710b96fc3e51029852 (diff)
parentbddf1d7590539a681fd70a88b6abd09dc7c550fb (diff)
Auto merge of #3234 - RalfJung:rustup, r=RalfJung
Rustup
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/Cargo.lock10
-rw-r--r--src/bootstrap/Cargo.toml2
-rw-r--r--src/bootstrap/src/core/build_steps/tool.rs13
-rw-r--r--src/bootstrap/src/core/builder.rs14
-rw-r--r--src/bootstrap/src/utils/change_tracker.rs5
-rw-r--r--src/bootstrap/src/utils/metrics.rs2
6 files changed, 34 insertions, 12 deletions
diff --git a/src/bootstrap/Cargo.lock b/src/bootstrap/Cargo.lock
index f8e6d629ba3..63190fc3180 100644
--- a/src/bootstrap/Cargo.lock
+++ b/src/bootstrap/Cargo.lock
@@ -428,9 +428,9 @@ dependencies = [
 
 [[package]]
 name = "once_cell"
-version = "1.12.0"
+version = "1.19.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225"
+checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
 
 [[package]]
 name = "opener"
@@ -620,9 +620,9 @@ dependencies = [
 
 [[package]]
 name = "sysinfo"
-version = "0.26.7"
+version = "0.30.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c375d5fd899e32847b8566e10598d6e9f1d9b55ec6de3cdf9e7da4bdc51371bc"
+checksum = "c68492e7268037de59ae153d7efb79546cf94a18a9548235420d3d8d2436b4b1"
 dependencies = [
  "cfg-if",
  "core-foundation-sys",
@@ -630,7 +630,7 @@ dependencies = [
  "ntapi",
  "once_cell",
  "rayon",
- "winapi",
+ "windows",
 ]
 
 [[package]]
diff --git a/src/bootstrap/Cargo.toml b/src/bootstrap/Cargo.toml
index 077d1954b7b..225eccca40f 100644
--- a/src/bootstrap/Cargo.toml
+++ b/src/bootstrap/Cargo.toml
@@ -59,7 +59,7 @@ walkdir = "2"
 xz2 = "0.1"
 
 # Dependencies needed by the build-metrics feature
-sysinfo = { version = "0.26.0", optional = true }
+sysinfo = { version = "0.30.0", optional = true }
 
 # Solaris doesn't support flock() and thus fd-lock is not option now
 [target.'cfg(not(target_os = "solaris"))'.dependencies]
diff --git a/src/bootstrap/src/core/build_steps/tool.rs b/src/bootstrap/src/core/build_steps/tool.rs
index 9942f00a056..8e3941dbeda 100644
--- a/src/bootstrap/src/core/build_steps/tool.rs
+++ b/src/bootstrap/src/core/build_steps/tool.rs
@@ -671,11 +671,14 @@ impl Step for RustAnalyzerProcMacroSrv {
         // 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.tools.as_ref().map_or(true, |tools| {
-                tools
-                    .iter()
-                    .any(|tool| tool == "rust-analyzer" || tool == "rust-analyzer-proc-macro-srv")
-            }))
+            .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<'_>) {
diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs
index e1809644350..56bdc9aaef1 100644
--- a/src/bootstrap/src/core/builder.rs
+++ b/src/bootstrap/src/core/builder.rs
@@ -289,6 +289,18 @@ impl PathSet {
     }
 }
 
+const PATH_REMAP: &[(&str, &str)] = &[("rust-analyzer-proc-macro-srv", "proc-macro-srv-cli")];
+
+fn remap_paths(paths: &mut Vec<&Path>) {
+    for path in paths.iter_mut() {
+        for &(search, replace) in PATH_REMAP {
+            if path.to_str() == Some(search) {
+                *path = Path::new(replace)
+            }
+        }
+    }
+}
+
 impl StepDescription {
     fn from<S: Step>(kind: Kind) -> StepDescription {
         StepDescription {
@@ -361,6 +373,8 @@ impl StepDescription {
         let mut paths: Vec<_> =
             paths.into_iter().map(|p| p.strip_prefix(".").unwrap_or(p)).collect();
 
+        remap_paths(&mut paths);
+
         // Handle all test suite paths.
         // (This is separate from the loop below to avoid having to handle multiple paths in `is_suite_path` somehow.)
         paths.retain(|path| {
diff --git a/src/bootstrap/src/utils/change_tracker.rs b/src/bootstrap/src/utils/change_tracker.rs
index 8b53a61542e..1eadc036b5e 100644
--- a/src/bootstrap/src/utils/change_tracker.rs
+++ b/src/bootstrap/src/utils/change_tracker.rs
@@ -96,4 +96,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
         severity: ChangeSeverity::Info,
         summary: "Removed rust.run_dsymutil and dist.gpg_password_file config options, as they were unused.",
     },
+    ChangeInfo {
+        change_id: 119124,
+        severity: ChangeSeverity::Warning,
+        summary: "rust-analyzer-proc-macro-srv is no longer enabled by default. To build it, you must either enable it in the configuration or explicitly invoke it with x.py.",
+    },
 ];
diff --git a/src/bootstrap/src/utils/metrics.rs b/src/bootstrap/src/utils/metrics.rs
index 174f374224c..697dd2f3505 100644
--- a/src/bootstrap/src/utils/metrics.rs
+++ b/src/bootstrap/src/utils/metrics.rs
@@ -15,7 +15,7 @@ use std::cell::RefCell;
 use std::fs::File;
 use std::io::BufWriter;
 use std::time::{Duration, Instant, SystemTime};
-use sysinfo::{CpuExt, System, SystemExt};
+use sysinfo::System;
 
 // Update this number whenever a breaking change is made to the build metrics.
 //