diff options
| author | Luuk de Gram <luuk@degram.dev> | 2021-12-21 20:10:36 +0100 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-12-21 12:38:50 -0800 |
| commit | 4cb2f11693b1bf13770b8ad6a8b8a1e37101a516 (patch) | |
| tree | 5c874f02332d2cefabc66fd5d5d6d6e505ea6599 /lib/std | |
| parent | e15a267668bae168f2bba06cc3706c54bc062522 (diff) | |
| download | zig-4cb2f11693b1bf13770b8ad6a8b8a1e37101a516.tar.gz zig-4cb2f11693b1bf13770b8ad6a8b8a1e37101a516.zip | |
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
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/build.zig | 8 |
1 files changed, 8 insertions, 0 deletions
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})); } |
