From 13197322ec78820cdd3214d8001f81fa4773918b Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sat, 14 Jan 2023 18:45:47 +0000 Subject: [PATCH] Skip creating sysroot target dir if it will be empty --- build_system/build_sysroot.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build_system/build_sysroot.rs b/build_system/build_sysroot.rs index f92841ab993..d3bc7ec0128 100644 --- a/build_system/build_sysroot.rs +++ b/build_system/build_sysroot.rs @@ -103,6 +103,10 @@ struct SysrootTarget { impl SysrootTarget { fn install_into_sysroot(&self, sysroot: &Path) { + if self.libs.is_empty() { + return; + } + let target_rustlib_lib = sysroot.join("lib").join("rustlib").join(&self.triple).join("lib"); fs::create_dir_all(&target_rustlib_lib).unwrap();