File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff 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" ] || ""
Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments