Skip to content

Commit 672c474

Browse files
Merge pull request #615 from ruby/katei/wasi-sdk-25
2 parents 72689cb + 2d5dcf2 commit 672c474

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

.github/workflows/build-gems.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
id: fetch
1919
with:
2020
supported-ruby-platforms: |
21-
exclude: [arm-linux, x64-mingw32]
21+
exclude: [arm-linux, x64-mingw32, aarch64-mingw-ucrt]
2222
stable-ruby-versions: |
2323
exclude: [head]
2424

lib/ruby_wasm/build/product/crossruby.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,17 @@ def configure_args(build_triple, toolchain)
345345
wasi_sdk_path = @toolchain
346346
args << %Q(WASMOPT=#{wasi_sdk_path.wasm_opt})
347347
args << %Q(WASI_SDK_PATH=#{wasi_sdk_path.wasi_sdk_path})
348+
# NOTE: wasi-libc 22 and later defines stubs for fchmod and chmod
349+
# but they just return ENOTSUP, and ruby's configure doesn't check
350+
# the runtime behavior. So we need to tell configure that
351+
# these functions are not available.
352+
# https://github.com/WebAssembly/wasi-libc/pull/463
353+
args << %Q(ac_cv_func_fchmod=no)
354+
args << %Q(ac_cv_func_chmod=no)
355+
# TODO: wasi-libc 22 and later started using musl's realpath impl but
356+
# it broke Kernel#require on @bjorn3/browser_wasi_shim setup for some
357+
# reason. So we disable it for now.
358+
args << %Q(ac_cv_func_realpath=no)
348359
when "wasm32-unknown-emscripten"
349360
ldflags.concat(%w[-s MODULARIZE=1])
350361
env_emcc_ldflags = ENV["RUBY_WASM_EMCC_LDFLAGS"] || ""

lib/ruby_wasm/build/toolchain.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class WASISDK < Toolchain
5656
def initialize(
5757
wasi_sdk_path = ENV["WASI_SDK_PATH"],
5858
build_dir: nil,
59-
version_major: 21,
59+
version_major: 22,
6060
version_minor: 0,
6161
binaryen_version: 108
6262
)

0 commit comments

Comments
 (0)