diff --git a/lib/ruby_wasm/build/product/crossruby.rb b/lib/ruby_wasm/build/product/crossruby.rb index 73ec915507..df0a8887b8 100644 --- a/lib/ruby_wasm/build/product/crossruby.rb +++ b/lib/ruby_wasm/build/product/crossruby.rb @@ -90,10 +90,15 @@ def do_legacy_extconf(executor, crossruby) "--disable=gems", # HACK: top_srcdir is required to find ruby headers "-e", - %Q($top_srcdir="#{source.src_dir}"), + %Q($top_srcdir=ENV["top_srcdir"]="#{source.src_dir}"), # HACK: extout is required to find config.h "-e", - %Q($extout="#{crossruby.build_dir}/.ext"), + %Q($extout=ENV["extout"]="#{crossruby.build_dir}/.ext"), + *(@features.support_component_model? ? [] : [ + # HACK: skip have_devel check since ruby is not installed yet + "-e", + "$have_devel = true", + ]), # HACK: force static ext build by imitating extmk "-e", "$static = true; trace_var(:$static) {|v| $static = true }",