Skip to content

Commit d4ea1cf

Browse files
Make --enable-component-model the default for js gem
In this way, we can avoid the need to specify `BUNDLE_BUILD__JS=--enable-component-model` when running `bundle install` for the `js` gem. When running `bundle install`, it's usually dynamic-linking enabled, so it makes sense to enable the component model by default.
1 parent c4c9585 commit d4ea1cf

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/ruby_wasm/build/product/crossruby.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def do_extconf(executor, crossruby)
7878
"#{@srcdir}/extconf.rb",
7979
"--target-rbconfig=#{rbconfig_rb}",
8080
]
81-
extconf_args << "--enable-component-model" if @features.support_component_model?
81+
extconf_args << "--disable-component-model" unless @features.support_component_model?
8282
executor.system crossruby.baseruby_path, *extconf_args
8383
end
8484

@@ -111,7 +111,7 @@ def do_legacy_extconf(executor, crossruby)
111111
"-I#{crossruby.build_dir}",
112112
"--",
113113
]
114-
extconf_args << "--enable-component-model" if @features.support_component_model?
114+
extconf_args << "--disable-component-model" unless @features.support_component_model?
115115
# Clear RUBYOPT to avoid loading unrelated bundle setup
116116
executor.system crossruby.baseruby_path,
117117
*extconf_args,

packages/gems/js/ext/js/extconf.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
$objs = %w[js-core.o witapi-core.o]
1313

14-
use_component_model = enable_config("component-model", false)
14+
use_component_model = enable_config("component-model", true)
1515
$stderr.print "Building with component model: "
1616
$stderr.puts use_component_model ? "\e[1;32myes\e[0m" : "\e[1;31mno\e[0m"
1717
if use_component_model

0 commit comments

Comments
 (0)