Skip to content

Commit 5d6aff2

Browse files
Skip wasi-vfs initialization for PIC build by default
1 parent fbebb9d commit 5d6aff2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/gems/js/ext/js/witapi-core.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)