From 307cccd55d30fdf44e770cfb06ad7777d21ee44f Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Tue, 5 Dec 2023 09:33:19 +0000 Subject: [PATCH] fix: When using extended LLVM check if the include folder is present --- src/toolchain/llvm.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/toolchain/llvm.rs b/src/toolchain/llvm.rs index da083317..8ed86261 100644 --- a/src/toolchain/llvm.rs +++ b/src/toolchain/llvm.rs @@ -177,10 +177,19 @@ impl Installable for Llvm { let mut exports: Vec = Vec::new(); #[cfg(unix)] - let is_installed = Path::new(&self.path).exists(); + let install_path = if self.extended { + Path::new(&self.path).join("esp-clang").join("include") + } else { + Path::new(&self.path).to_path_buf() + }; #[cfg(windows)] - let is_installed = self.path.join(&self.version).exists(); - if is_installed { + let install_path = if self.extended { + self.path.join(&self.version).join("include") + } else { + self.path.join(&self.version) + }; + + if install_path.exists() { warn!( "Previous installation of LLVM exists in: '{}'. Reusing this installation", self.path.to_str().unwrap()