Skip to content

Commit dda987c

Browse files
committed
fix(windows): use .exe extension for wasm-opt binary verification on Windows
1 parent 4038771 commit dda987c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

toolchains/tinygo_toolchain.bzl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,9 @@ def _download_binaryen(repository_ctx, platform):
101101
stripPrefix = "binaryen-version_{}".format(binaryen_version),
102102
)
103103

104-
# Verify wasm-opt installation
105-
wasm_opt_binary = repository_ctx.path("binaryen/bin/wasm-opt")
104+
# Verify wasm-opt installation (use .exe on Windows)
105+
wasm_opt_binary_name = "wasm-opt.exe" if platform == "windows_amd64" else "wasm-opt"
106+
wasm_opt_binary = repository_ctx.path("binaryen/bin/{}".format(wasm_opt_binary_name))
106107
if not wasm_opt_binary.exists:
107108
fail("wasm-opt binary not found after download: {}".format(wasm_opt_binary))
108109

0 commit comments

Comments
 (0)