File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -14,4 +14,5 @@ bindgen/legacy/%.o: $(srcdir)/bindgen/legacy/%.c
1414
1515bindgen/ext.o: $(srcdir)/bindgen/ext.c
1616 @mkdir -p "$(@D)"
17- $(CC) -c -o $@ $<
17+ $(ECHO) compiling $(<)
18+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
Original file line number Diff line number Diff line change 1919 $objs << "bindgen/legacy/rb-js-abi-host.o"
2020 $objs << "bindgen/legacy/rb-abi-guest.o"
2121end
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+
2231create_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
2534end
Original file line number Diff line number Diff line change @@ -363,10 +363,15 @@ static inline void __wasm_call_ctors_if_needed(void) {
363363 __wasm_call_ctors_done = true;
364364 __wasm_call_ctors ();
365365
366+ // Initialize VFS runtime if it's used
367+ // NOTE: We don't use wasi-vfs for PIC build. Instead, we use
368+ // Component Model-native wasi-virt.
369+ # ifndef __PIC__
366370 __attribute__((weak )) extern void __wasi_vfs_rt_init (void );
367371 if (__wasi_vfs_rt_init ) {
368372 __wasi_vfs_rt_init ();
369373 }
374+ # endif
370375 }
371376}
372377
You can’t perform that action at this time.
0 commit comments