diff options
| author | Luuk de Gram <luuk@degram.dev> | 2022-12-28 14:41:27 +0100 |
|---|---|---|
| committer | Luuk de Gram <luuk@degram.dev> | 2022-12-28 14:41:27 +0100 |
| commit | 4aab8118a771e37566c0c3b1c40c175ce1e98285 (patch) | |
| tree | 904bafeb49f697ef01d20390e3586378f078916a /src/Compilation.zig | |
| parent | 7802c26449657b205dcaa47bb6575bb26171c024 (diff) | |
| download | zig-4aab8118a771e37566c0c3b1c40c175ce1e98285.tar.gz zig-4aab8118a771e37566c0c3b1c40c175ce1e98285.zip | |
WebAssembly: don't append `--export` for functions
No longer automatically append the `--export` flag for each exported
function unconditionally. This was essentially a hack to prevent
binary bloat caused by compiler-rt symbols being always included in
the final binary as they were exported and therefore not garbage-
collected. This is no longer needed as we now support the ability to
set the visibility of exports.
This essentially reverts 6d951aff7e32b1b0252d341e66517a9a9ee98a2d
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index ab91e3cbb3..5b80e5c7a7 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -181,10 +181,6 @@ 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 default_stack_protector_buffer_size = 4; pub const SemaError = Module.SemaError; @@ -2168,11 +2164,6 @@ pub fn destroy(self: *Compilation) void { self.cache_parent.manifest_dir.close(); if (self.owned_link_dir) |*dir| dir.close(); - 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(); } |
