diff options
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index ea243dd73d..4ad4d3edfa 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -166,6 +166,10 @@ emit_docs: ?EmitLoc, work_queue_wait_group: WaitGroup, astgen_wait_group: WaitGroup, +/// Exported symbol names. This is only for when the target is wasm. +/// TODO: Remove this when Stage2 becomes the default compiler as it will already have this information. +export_symbol_names: std.ArrayListUnmanaged([]const u8) = .{}, + pub const SemaError = Module.SemaError; pub const CRTFile = struct { @@ -1878,6 +1882,11 @@ pub fn destroy(self: *Compilation) void { self.work_queue_wait_group.deinit(); self.astgen_wait_group.deinit(); + for (self.export_symbol_names.items) |symbol_name| { + gpa.free(symbol_name); + } + self.export_symbol_names.deinit(gpa); + // This destroys `self`. self.arena_state.promote(gpa).deinit(); } |
