From 4cb2f11693b1bf13770b8ad6a8b8a1e37101a516 Mon Sep 17 00:00:00 2001 From: Luuk de Gram Date: Tue, 21 Dec 2021 20:10:36 +0100 Subject: wasm-linker: Implement the --export-table and --import-table flags. This implements the flags for both the linker frontend as well as the self-hosted linker. Closes #5790 --- lib/std/build.zig | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/std') diff --git a/lib/std/build.zig b/lib/std/build.zig index b7785b214f..631ca43f38 100644 --- a/lib/std/build.zig +++ b/lib/std/build.zig @@ -1479,6 +1479,8 @@ pub const LibExeObjStep = struct { sanitize_thread: bool, rdynamic: bool, import_memory: bool = false, + import_table: bool = false, + export_table: bool = false, initial_memory: ?u64 = null, max_memory: ?u64 = null, global_base: ?u64 = null, @@ -2509,6 +2511,12 @@ pub const LibExeObjStep = struct { if (self.import_memory) { try zig_args.append("--import-memory"); } + if (self.import_table) { + try zig_args.append("--import-table"); + } + if (self.export_table) { + try zig_args.append("--export-table"); + } if (self.initial_memory) |initial_memory| { try zig_args.append(builder.fmt("--initial-memory={d}", .{initial_memory})); } -- cgit v1.2.3