diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-12-21 18:20:33 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-12-21 18:21:42 -0700 |
| commit | 2cbeb85a96af25f2718a604aa2bec4f76dd85018 (patch) | |
| tree | efc5b9f311f53440d656b006d7c5ecec3a0443f6 /src/link | |
| parent | 2e887452d5cd8e912f6bdb36bd0da6faee383465 (diff) | |
| download | zig-2cbeb85a96af25f2718a604aa2bec4f76dd85018.tar.gz zig-2cbeb85a96af25f2718a604aa2bec4f76dd85018.zip | |
stage2: error check for mixing --import-table and --export-table
is moved from the linker to the frontend. This is a follow-up from
4cb2f11693b1bf13770b8ad6a8b8a1e37101a516.
Diffstat (limited to 'src/link')
| -rw-r--r-- | src/link/Wasm.zig | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/link/Wasm.zig b/src/link/Wasm.zig index c305959e56..35a1ac672a 100644 --- a/src/link/Wasm.zig +++ b/src/link/Wasm.zig @@ -1123,14 +1123,12 @@ fn linkWithLLD(self: *Wasm, comp: *Compilation) !void { } if (self.base.options.import_table) { - if (self.base.options.export_table) { - log.err("--import-table and --export-table may not be used together", .{}); - return error.InvalidArgs; - } + assert(self.base.options.export_table); try argv.append("--import-table"); } if (self.base.options.export_table) { + assert(!self.base.options.import_table); try argv.append("--export-table"); } |
