Rollup merge of #116430 - onur-ozkan:vendoring-in-tarball-sources, r=clubby789

vendoring in tarball sources

fixes #94782
This commit is contained in:
Matthias Krüger 2023-10-16 19:10:49 +02:00 committed by GitHub
commit 6f9df29ad5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View File

@ -22,7 +22,6 @@ fn configure_with_args(cmd: &[String], host: &[&str], target: &[&str]) -> Config
..Config::parse(&["check".to_owned()])
});
submodule_build.update_submodule(Path::new("src/doc/book"));
submodule_build.update_submodule(Path::new("src/tools/rust-analyzer"));
config.submodules = Some(false);
config.ninja_in_file = false;

View File

@ -1002,11 +1002,15 @@ fn run(self, builder: &Builder<'_>) -> GeneratedTarball {
channel::write_commit_info_file(&plain_dst_src, info);
}
// If we're building from git sources, we need to vendor a complete distribution.
if builder.rust_info().is_managed_git_subrepository() {
// Ensure we have the submodules checked out.
builder.update_submodule(Path::new("src/tools/cargo"));
builder.update_submodule(Path::new("src/tools/rust-analyzer"));
// If we're building from git or tarball sources, we need to vendor
// a complete distribution.
if builder.rust_info().is_managed_git_subrepository()
|| builder.rust_info().is_from_tarball()
{
if builder.rust_info().is_managed_git_subrepository() {
// Ensure we have the submodules checked out.
builder.update_submodule(Path::new("src/tools/cargo"));
}
// Vendor all Cargo dependencies
let mut cmd = Command::new(&builder.initial_cargo);