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
This commit is contained in:
Matthias Krüger 2023-02-27 18:48:48 +01:00 committed by GitHub
commit 2375d7f386
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 11 additions and 9 deletions

View File

@ -50,6 +50,7 @@ dependencies = [
"opener", "opener",
"pretty_assertions", "pretty_assertions",
"serde", "serde",
"serde_derive",
"serde_json", "serde_json",
"sha2", "sha2",
"sysinfo", "sysinfo",
@ -564,9 +565,6 @@ name = "serde"
version = "1.0.137" version = "1.0.137"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1"
dependencies = [
"serde_derive",
]
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"

View File

@ -39,7 +39,10 @@ cc = "1.0.69"
libc = "0.2" libc = "0.2"
hex = "0.4" hex = "0.4"
object = { version = "0.29.0", default-features = false, features = ["archive", "coff", "read_core", "unaligned"] } 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" serde_json = "1.0.2"
sha2 = "0.10" sha2 = "0.10"
tar = "0.4" tar = "0.4"

View File

@ -16,7 +16,7 @@ use std::path::{Path, PathBuf};
use std::process::{Command, Stdio}; use std::process::{Command, Stdio};
use std::str; use std::str;
use serde::Deserialize; use serde_derive::Deserialize;
use crate::builder::crate_description; use crate::builder::crate_description;
use crate::builder::Cargo; use crate::builder::Cargo;

View File

@ -25,6 +25,7 @@ use crate::flags::{Color, Flags};
use crate::util::{exe, output, t}; use crate::util::{exe, output, t};
use once_cell::sync::OnceCell; use once_cell::sync::OnceCell;
use serde::{Deserialize, Deserializer}; use serde::{Deserialize, Deserializer};
use serde_derive::Deserialize;
macro_rules! check_ci_llvm { macro_rules! check_ci_llvm {
($name:expr) => { ($name:expr) => {

View File

@ -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"]) get_git_modified_files(Some(&build.config.src), &vec!["rs"])
} }
#[derive(serde::Deserialize)] #[derive(serde_derive::Deserialize)]
struct RustfmtConfig { struct RustfmtConfig {
ignore: Vec<String>, ignore: Vec<String>,
} }

View File

@ -1,7 +1,7 @@
use std::path::PathBuf; use std::path::PathBuf;
use std::process::Command; use std::process::Command;
use serde::Deserialize; use serde_derive::Deserialize;
use crate::cache::INTERNER; use crate::cache::INTERNER;
use crate::util::output; use crate::util::output;

View File

@ -7,7 +7,7 @@
use crate::builder::Step; use crate::builder::Step;
use crate::util::t; use crate::util::t;
use crate::Build; use crate::Build;
use serde::{Deserialize, Serialize}; use serde_derive::{Deserialize, Serialize};
use std::cell::RefCell; use std::cell::RefCell;
use std::fs::File; use std::fs::File;
use std::io::BufWriter; use std::io::BufWriter;

View File

@ -1,6 +1,6 @@
use crate::builder::{Builder, RunConfig, ShouldRun, Step}; use crate::builder::{Builder, RunConfig, ShouldRun, Step};
use crate::util::t; use crate::util::t;
use serde::{Deserialize, Serialize}; use serde_derive::{Deserialize, Serialize};
use std::collections::HashMap; use std::collections::HashMap;
use std::env; use std::env;
use std::fmt; use std::fmt;