File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
lib/ruby_wasm/build/product Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -322,6 +322,10 @@ def baseruby_path
322322 File . join ( @baseruby . install_dir , "bin/ruby" )
323323 end
324324
325+ def dump_ast_path
326+ File . join ( @baseruby . product_build_dir , "dump_ast" )
327+ end
328+
325329 def configure_args ( build_triple , toolchain )
326330 target = @params . target . triple
327331 default_exts = @params . default_exts
@@ -336,6 +340,9 @@ def configure_args(build_triple, toolchain)
336340 args << %Q(--with-zlib-dir=#{ @zlib . install_root } )
337341 args << %Q(--with-openssl-dir=#{ @openssl . install_root } ) if @openssl
338342 args << %Q(--with-baseruby=#{ baseruby_path } )
343+ # Use the host-built dump_ast so cross builds don't try to execute the
344+ # target-side wasm dump_ast while generating .rbinc files.
345+ args << %Q(--with-dump-ast=#{ dump_ast_path } )
339346
340347 case target
341348 when /^wasm32-unknown-wasi/
Original file line number Diff line number Diff line change @@ -218,6 +218,7 @@ module RubyWasm
218218 def extinit_obj : -> String
219219 def extinit_c_erb : -> String
220220 def baseruby_path : -> String
221+ def dump_ast_path : -> String
221222 def configure_args : (String build_triple, Toolchain toolchain) -> Array[String]
222223 def rbconfig_rb : -> String?
223224 end
You can’t perform that action at this time.
0 commit comments