diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-08-15 16:58:20 +0200 |
|---|---|---|
| committer | Jakub Beránek <berykubik@gmail.com> | 2025-08-15 16:58:52 +0200 |
| commit | 24f5cc41c80a5ca22d5e6871aa71d1367bc15bf8 (patch) | |
| tree | 44e0bae998f913aa6d13f472fad710d1a7ce7302 /src/bootstrap | |
| parent | 8800ec16657b24ad8a2f443c133bf0b56ae76033 (diff) | |
| download | rust-24f5cc41c80a5ca22d5e6871aa71d1367bc15bf8.tar.gz rust-24f5cc41c80a5ca22d5e6871aa71d1367bc15bf8.zip | |
Do not copy files in `copy_src_dirs` in dry run
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/src/core/build_steps/dist.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs index 64c2cdd2ec7..414f4464d1e 100644 --- a/src/bootstrap/src/core/build_steps/dist.rs +++ b/src/bootstrap/src/core/build_steps/dist.rs @@ -916,6 +916,12 @@ fn copy_src_dirs( exclude_dirs: &[&str], dst_dir: &Path, ) { + // Iterating, filtering and copying a large number of directories can be quite slow. + // Avoid doing it in dry run (and thus also tests). + if builder.config.dry_run() { + return; + } + fn filter_fn(exclude_dirs: &[&str], dir: &str, path: &Path) -> bool { let spath = match path.to_str() { Some(path) => path, |
