From 9b62e461ed4fe5e3921c743ee2490223921bc6b4 Mon Sep 17 00:00:00 2001 From: Ezekiel Warren Date: Mon, 25 Mar 2024 14:25:03 -0700 Subject: [PATCH] windows: Add extension builder support (#9791) Release Notes: - N/A --- crates/extension/src/extension_builder.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/extension/src/extension_builder.rs b/crates/extension/src/extension_builder.rs index 23969728a3..e26de37d3a 100644 --- a/crates/extension/src/extension_builder.rs +++ b/crates/extension/src/extension_builder.rs @@ -37,6 +37,8 @@ const WASI_SDK_ASSET_NAME: Option<&str> = if cfg!(target_os = "macos") { Some("wasi-sdk-21.0-macos.tar.gz") } else if cfg!(target_os = "linux") { Some("wasi-sdk-21.0-linux.tar.gz") +} else if cfg!(target_os = "windows") { + Some("wasi-sdk-21.0.m-mingw.tar.gz") } else { None }; @@ -371,7 +373,7 @@ impl ExtensionBuilder { let wasi_sdk_dir = self.cache_dir.join("wasi-sdk"); let mut clang_path = wasi_sdk_dir.clone(); - clang_path.extend(["bin", "clang-17"]); + clang_path.extend(["bin", &format!("clang{}", env::consts::EXE_SUFFIX)]); if fs::metadata(&clang_path).map_or(false, |metadata| metadata.is_file()) { return Ok(clang_path);