summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ruby.c b/ruby.c
index b300526017..ade434cff3 100644
--- a/ruby.c
+++ b/ruby.c
@@ -1524,6 +1524,15 @@ ruby_init_prelude(void)
void rb_call_builtin_inits(void);
+// Initialize extra optional exts linked statically.
+// This empty definition will be replaced with the actual strong symbol by linker.
+#if RBIMPL_HAS_ATTRIBUTE(weak)
+__attribute__((weak))
+#endif
+void Init_extra_exts(void)
+{
+}
+
static void
ruby_opt_init(ruby_cmdline_options_t *opt)
{
@@ -1542,6 +1551,7 @@ ruby_opt_init(ruby_cmdline_options_t *opt)
rb_warning_category_update(opt->warn.mask, opt->warn.set);
Init_ext(); /* load statically linked extensions before rubygems */
+ Init_extra_exts();
rb_call_builtin_inits();
ruby_init_prelude();