Skip to content

Commit 6f386e7

Browse files
committed
Only delete the lld directory if it exists
1 parent bd9bd38 commit 6f386e7

File tree

1 file changed

+3
-1
lines changed
  • src/tools/opt-dist/src/utils

1 file changed

+3
-1
lines changed

src/tools/opt-dist/src/utils/mod.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ pub fn clear_llvm_files(env: &Environment) -> anyhow::Result<()> {
3636
// directories ourselves.
3737
log::info!("Clearing LLVM build files");
3838
delete_directory(&env.build_artifacts().join("llvm"))?;
39-
delete_directory(&env.build_artifacts().join("lld"))?;
39+
if env.build_artifacts().join("lld").is_dir() {
40+
delete_directory(&env.build_artifacts().join("lld"))?;
41+
}
4042
Ok(())
4143
}
4244

0 commit comments

Comments
 (0)