Skip to content

Commit 025792b

Browse files
committed
fix: When using extended LLVM check if the include folder is present
1 parent 4cd89f3 commit 025792b

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/toolchain/llvm.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,19 @@ impl Installable for Llvm {
187187
let mut exports: Vec<String> = Vec::new();
188188

189189
#[cfg(unix)]
190-
let is_installed = Path::new(&self.path).exists();
190+
let install_path = if self.extended {
191+
Path::new(&self.path).join("esp-clang").join("include")
192+
} else {
193+
Path::new(&self.path).to_path_buf()
194+
};
191195
#[cfg(windows)]
192-
let is_installed = self.path.join(&self.version).exists();
193-
if is_installed {
196+
let install_path = if self.extended {
197+
self.path.join(&self.version).join("include")
198+
} else {
199+
self.path.join(&self.version)
200+
};
201+
202+
if install_path.exists() {
194203
warn!(
195204
"Previous installation of LLVM exists in: '{}'. Reusing this installation",
196205
self.path.to_str().unwrap()

0 commit comments

Comments
 (0)