Skip to content

Commit 0d9b427

Browse files
Link the component type object to the shared library
1 parent 5d6aff2 commit 0d9b427

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,16 @@
1919
$objs << "bindgen/legacy/rb-js-abi-host.o"
2020
$objs << "bindgen/legacy/rb-abi-guest.o"
2121
end
22+
23+
component_type_obj = "$(srcdir)/bindgen/ext_component_type.o"
24+
25+
unless $static
26+
# When building shared library, we need to link the component type object
27+
# to the shared library instead of the main ruby executable.
28+
$libs << component_type_obj
29+
end
30+
2231
create_makefile("js") do |mk|
23-
mk << "EXTRA_OBJS = $(srcdir)/bindgen/ext_component_type.o\n" if use_component_model
32+
mk << "EXTRA_OBJS = #{component_type_obj}\n" if use_component_model
2433
mk
2534
end

0 commit comments

Comments
 (0)