forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#124452 - matthiaskrgr:rollup-psvo04i, r=matth…
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#123942 (`x vendor`) - rust-lang#124165 (add test for incremental ICE: slice-pattern-const.rs rust-lang#83085) - rust-lang#124210 (Abort a process when FD ownership is violated) - rust-lang#124242 (bootstrap: Describe build_steps modules) - rust-lang#124406 (Remove unused `[patch]` for clippy_lints) - rust-lang#124429 (bootstrap: Document `struct Builder` and its fields) - rust-lang#124447 (Unconditionally call `really_init` on GNU/Linux) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
25 changed files
with
489 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
use crate::core::builder::{Builder, RunConfig, ShouldRun, Step}; | ||
use std::path::PathBuf; | ||
use std::process::Command; | ||
|
||
#[derive(Debug, Clone, Hash, PartialEq, Eq)] | ||
pub(crate) struct Vendor { | ||
sync_args: Vec<PathBuf>, | ||
versioned_dirs: bool, | ||
root_dir: PathBuf, | ||
} | ||
|
||
impl Step for Vendor { | ||
type Output = (); | ||
const DEFAULT: bool = true; | ||
const ONLY_HOSTS: bool = true; | ||
|
||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { | ||
run.alias("placeholder").default_condition(true) | ||
} | ||
|
||
fn make_run(run: RunConfig<'_>) { | ||
run.builder.ensure(Vendor { | ||
sync_args: run.builder.config.cmd.vendor_sync_args(), | ||
versioned_dirs: run.builder.config.cmd.vendor_versioned_dirs(), | ||
root_dir: run.builder.src.clone(), | ||
}); | ||
} | ||
|
||
fn run(self, builder: &Builder<'_>) -> Self::Output { | ||
let mut cmd = Command::new(&builder.initial_cargo); | ||
cmd.arg("vendor"); | ||
|
||
if self.versioned_dirs { | ||
cmd.arg("--versioned-dirs"); | ||
} | ||
|
||
// Sync these paths by default. | ||
for p in [ | ||
"src/tools/cargo/Cargo.toml", | ||
"src/tools/rust-analyzer/Cargo.toml", | ||
"compiler/rustc_codegen_cranelift/Cargo.toml", | ||
"compiler/rustc_codegen_gcc/Cargo.toml", | ||
"src/bootstrap/Cargo.toml", | ||
] { | ||
cmd.arg("--sync").arg(builder.src.join(p)); | ||
} | ||
|
||
// Also sync explicitly requested paths. | ||
for sync_arg in self.sync_args { | ||
cmd.arg("--sync").arg(sync_arg); | ||
} | ||
|
||
// Will read the libstd Cargo.toml | ||
// which uses the unstable `public-dependency` feature. | ||
cmd.env("RUSTC_BOOTSTRAP", "1"); | ||
|
||
cmd.current_dir(self.root_dir); | ||
|
||
builder.run(&mut cmd); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.