diff --git a/.github/workflows/build-gems.yml b/.github/workflows/build-gems.yml index e743e2c7a..7556cced2 100644 --- a/.github/workflows/build-gems.yml +++ b/.github/workflows/build-gems.yml @@ -18,7 +18,7 @@ jobs: id: fetch with: supported-ruby-platforms: | - exclude: [arm-linux, x64-mingw32] + exclude: [arm-linux, x64-mingw32, aarch64-mingw-ucrt] stable-ruby-versions: | exclude: [head] diff --git a/lib/ruby_wasm/build/product/crossruby.rb b/lib/ruby_wasm/build/product/crossruby.rb index 736af0278..a4c5d2d43 100644 --- a/lib/ruby_wasm/build/product/crossruby.rb +++ b/lib/ruby_wasm/build/product/crossruby.rb @@ -345,6 +345,17 @@ def configure_args(build_triple, toolchain) wasi_sdk_path = @toolchain args << %Q(WASMOPT=#{wasi_sdk_path.wasm_opt}) args << %Q(WASI_SDK_PATH=#{wasi_sdk_path.wasi_sdk_path}) + # NOTE: wasi-libc 22 and later defines stubs for fchmod and chmod + # but they just return ENOTSUP, and ruby's configure doesn't check + # the runtime behavior. So we need to tell configure that + # these functions are not available. + # https://github.com/WebAssembly/wasi-libc/pull/463 + args << %Q(ac_cv_func_fchmod=no) + args << %Q(ac_cv_func_chmod=no) + # TODO: wasi-libc 22 and later started using musl's realpath impl but + # it broke Kernel#require on @bjorn3/browser_wasi_shim setup for some + # reason. So we disable it for now. + args << %Q(ac_cv_func_realpath=no) when "wasm32-unknown-emscripten" ldflags.concat(%w[-s MODULARIZE=1]) env_emcc_ldflags = ENV["RUBY_WASM_EMCC_LDFLAGS"] || "" diff --git a/lib/ruby_wasm/build/toolchain.rb b/lib/ruby_wasm/build/toolchain.rb index 83b2a6459..5c1043223 100644 --- a/lib/ruby_wasm/build/toolchain.rb +++ b/lib/ruby_wasm/build/toolchain.rb @@ -56,7 +56,7 @@ class WASISDK < Toolchain def initialize( wasi_sdk_path = ENV["WASI_SDK_PATH"], build_dir: nil, - version_major: 21, + version_major: 22, version_minor: 0, binaryen_version: 108 )