diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-02-27 18:48:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-27 18:48:48 +0100 |
| commit | 2375d7f38698a23cfc87d7f9f570393245cbc2f7 (patch) | |
| tree | 0897bea1c3c766b54dab2398f8c4dc701759bc71 | |
| parent | 3fe4023370a50d89227c4d2f645f868ac753656f (diff) | |
| parent | fdbc3c2dcf7bf29324bd42968449a6d30d29961a (diff) | |
| download | rust-2375d7f38698a23cfc87d7f9f570393245cbc2f7.tar.gz rust-2375d7f38698a23cfc87d7f9f570393245cbc2f7.zip | |
Rollup merge of #108308 - bjorn3:faster_bootstrap_build, r=albertlarsan68
Allow building serde and serde_derive in parallel This reduces build time of bootstrap by ~6s
| -rw-r--r-- | src/bootstrap/Cargo.lock | 4 | ||||
| -rw-r--r-- | src/bootstrap/Cargo.toml | 5 | ||||
| -rw-r--r-- | src/bootstrap/compile.rs | 2 | ||||
| -rw-r--r-- | src/bootstrap/config.rs | 1 | ||||
| -rw-r--r-- | src/bootstrap/format.rs | 2 | ||||
| -rw-r--r-- | src/bootstrap/metadata.rs | 2 | ||||
| -rw-r--r-- | src/bootstrap/metrics.rs | 2 | ||||
| -rw-r--r-- | src/bootstrap/toolstate.rs | 2 |
8 files changed, 11 insertions, 9 deletions
diff --git a/src/bootstrap/Cargo.lock b/src/bootstrap/Cargo.lock index 4a0ba592577..e861d520c53 100644 --- a/src/bootstrap/Cargo.lock +++ b/src/bootstrap/Cargo.lock @@ -50,6 +50,7 @@ dependencies = [ "opener", "pretty_assertions", "serde", + "serde_derive", "serde_json", "sha2", "sysinfo", @@ -564,9 +565,6 @@ name = "serde" version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" -dependencies = [ - "serde_derive", -] [[package]] name = "serde_derive" diff --git a/src/bootstrap/Cargo.toml b/src/bootstrap/Cargo.toml index 22ceeca941e..663987f113c 100644 --- a/src/bootstrap/Cargo.toml +++ b/src/bootstrap/Cargo.toml @@ -39,7 +39,10 @@ cc = "1.0.69" libc = "0.2" hex = "0.4" object = { version = "0.29.0", default-features = false, features = ["archive", "coff", "read_core", "unaligned"] } -serde = { version = "1.0.8", features = ["derive"] } +serde = "1.0.137" +# Directly use serde_derive rather than through the derive feature of serde to allow building both +# in parallel and to allow serde_json and toml to start building as soon as serde has been built. +serde_derive = "1.0.137" serde_json = "1.0.2" sha2 = "0.10" tar = "0.4" diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 348d22a9ce6..8b80dfc0f9b 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -16,7 +16,7 @@ use std::path::{Path, PathBuf}; use std::process::{Command, Stdio}; use std::str; -use serde::Deserialize; +use serde_derive::Deserialize; use crate::builder::crate_description; use crate::builder::Cargo; diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index 4a563bc396d..05e74254949 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -25,6 +25,7 @@ use crate::flags::{Color, Flags}; use crate::util::{exe, output, t}; use once_cell::sync::OnceCell; use serde::{Deserialize, Deserializer}; +use serde_derive::Deserialize; macro_rules! check_ci_llvm { ($name:expr) => { diff --git a/src/bootstrap/format.rs b/src/bootstrap/format.rs index ae72a42973c..6d5753e8a6d 100644 --- a/src/bootstrap/format.rs +++ b/src/bootstrap/format.rs @@ -87,7 +87,7 @@ fn get_modified_rs_files(build: &Builder<'_>) -> Result<Option<Vec<String>>, Str get_git_modified_files(Some(&build.config.src), &vec!["rs"]) } -#[derive(serde::Deserialize)] +#[derive(serde_derive::Deserialize)] struct RustfmtConfig { ignore: Vec<String>, } diff --git a/src/bootstrap/metadata.rs b/src/bootstrap/metadata.rs index e193e70a0c4..bba4d65e8c3 100644 --- a/src/bootstrap/metadata.rs +++ b/src/bootstrap/metadata.rs @@ -1,7 +1,7 @@ use std::path::PathBuf; use std::process::Command; -use serde::Deserialize; +use serde_derive::Deserialize; use crate::cache::INTERNER; use crate::util::output; diff --git a/src/bootstrap/metrics.rs b/src/bootstrap/metrics.rs index c823dc79684..2e62c950709 100644 --- a/src/bootstrap/metrics.rs +++ b/src/bootstrap/metrics.rs @@ -7,7 +7,7 @@ use crate::builder::Step; use crate::util::t; use crate::Build; -use serde::{Deserialize, Serialize}; +use serde_derive::{Deserialize, Serialize}; use std::cell::RefCell; use std::fs::File; use std::io::BufWriter; diff --git a/src/bootstrap/toolstate.rs b/src/bootstrap/toolstate.rs index 1969e0b6f87..7aab88a1a73 100644 --- a/src/bootstrap/toolstate.rs +++ b/src/bootstrap/toolstate.rs @@ -1,6 +1,6 @@ use crate::builder::{Builder, RunConfig, ShouldRun, Step}; use crate::util::t; -use serde::{Deserialize, Serialize}; +use serde_derive::{Deserialize, Serialize}; use std::collections::HashMap; use std::env; use std::fmt; |
