aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authorLuuk de Gram <luuk@degram.dev>2021-12-21 20:10:36 +0100
committerAndrew Kelley <andrew@ziglang.org>2021-12-21 12:38:50 -0800
commit4cb2f11693b1bf13770b8ad6a8b8a1e37101a516 (patch)
tree5c874f02332d2cefabc66fd5d5d6d6e505ea6599 /src/Compilation.zig
parente15a267668bae168f2bba06cc3706c54bc062522 (diff)
downloadzig-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 'src/Compilation.zig')
-rw-r--r--src/Compilation.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index 861771def4..9a9ac5592a 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -724,6 +724,8 @@ pub const InitOptions = struct {
linker_allow_shlib_undefined: ?bool = null,
linker_bind_global_refs_locally: ?bool = null,
linker_import_memory: ?bool = null,
+ linker_import_table: bool = false,
+ linker_export_table: bool = false,
linker_initial_memory: ?u64 = null,
linker_max_memory: ?u64 = null,
linker_global_base: ?u64 = null,
@@ -1457,6 +1459,8 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
.allow_shlib_undefined = options.linker_allow_shlib_undefined,
.bind_global_refs_locally = options.linker_bind_global_refs_locally orelse false,
.import_memory = options.linker_import_memory orelse false,
+ .import_table = options.linker_import_table,
+ .export_table = options.linker_export_table,
.initial_memory = options.linker_initial_memory,
.max_memory = options.linker_max_memory,
.global_base = options.linker_global_base,