Skip to content

Commit

Permalink
Set $have_devel = true for static build
Browse files Browse the repository at this point in the history
Previously, mkmf failed with --disable-component-model build, because it
attempted to link during have_devel check but ruby is not installed yet.

This change reverts 70068a6 partially.
Setting `$have_devel = true` skips have_devel check.
  • Loading branch information
mame committed Dec 18, 2024
1 parent 2ba4910 commit 7988efd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/ruby_wasm/build/product/crossruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 }",
Expand Down

0 comments on commit 7988efd

Please sign in to comment.