| ... | ... | @@ -765,12 +765,8 @@ fn linkWithLLD(self: *Wasm, comp: *Compilation) !void { |
| 765 | 765 | if (self.base.options.wasi_exec_model == .reactor) { |
| 766 | 766 | // Reactor execution model does not have _start so lld doesn't look for it. |
| 767 | 767 | try argv.append("--no-entry"); |
| 768 | | // Make sure "_initialize" is exported even if this is pure Zig WASI reactor |
| 769 | | // where WASM_SYMBOL_EXPORTED flag in LLVM is not set on _initialize. |
| 770 | | try argv.appendSlice(&[_][]const u8{ |
| 771 | | "--export", |
| 772 | | "_initialize", |
| 773 | | }); |
| 768 | // Make sure "_initialize" and other used-defined functions are exported if this is WASI reactor. |
| 769 | try argv.append("--export-dynamic"); |
| 774 | 770 | } |
| 775 | 771 | } else { |
| 776 | 772 | try argv.append("--no-entry"); // So lld doesn't look for _start. |