diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2022-02-13 18:46:53 +0100 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2022-04-27 17:31:07 +0200 |
| commit | 944a48d3afb0fa27390ecbd2ceb0f1c666cf4c5b (patch) | |
| tree | 061ef4374df083bf97708664f2fb9de3db655284 | |
| parent | 88b5f5722a23800474d2c6b192dd5129590b4254 (diff) | |
| download | rust-944a48d3afb0fa27390ecbd2ceb0f1c666cf4c5b.tar.gz rust-944a48d3afb0fa27390ecbd2ceb0f1c666cf4c5b.zip | |
Remove less of the sysroot build dir on recompilation
| -rw-r--r-- | build_system/build_sysroot.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/build_system/build_sysroot.rs b/build_system/build_sysroot.rs index c9c003d4610..b301777e1e8 100644 --- a/build_system/build_sysroot.rs +++ b/build_system/build_sysroot.rs @@ -168,11 +168,10 @@ fn build_clif_sysroot_for_triple( let build_dir = Path::new("build_sysroot").join("target").join(triple).join(channel); if !super::config::get_bool("keep_sysroot") { - // Cleanup the target dir with the exception of build scripts and the incremental cache - for dir in ["build", "deps", "examples", "native"] { - if build_dir.join(dir).exists() { - fs::remove_dir_all(build_dir.join(dir)).unwrap(); - } + // Cleanup the deps dir, but keep build scripts and the incremental cache for faster + // recompilation as they are not affected by changes in cg_clif. + if build_dir.join("deps").exists() { + fs::remove_dir_all(build_dir.join("deps")).unwrap(); } } |
