diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2021-06-07 16:08:43 +0200 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2021-06-09 01:25:38 +0200 |
| commit | 95745f77da6cd3ca30aea6aa47253c1e0a4f5a75 (patch) | |
| tree | 7a43efe2587713a04f777acf00ba5fe2531bc817 /src/Compilation.zig | |
| parent | 4e4722a65e3bc3d6bb4518df3082ffea7c2a7c5d (diff) | |
| download | zig-95745f77da6cd3ca30aea6aa47253c1e0a4f5a75.tar.gz zig-95745f77da6cd3ca30aea6aa47253c1e0a4f5a75.zip | |
wasi: skip adding wasi_snapshot_preview1 as lib dep in stage1
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 444e69c557..1d85182f06 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -4157,6 +4157,12 @@ pub fn stage1AddLinkLib(comp: *Compilation, lib_name: []const u8) !void { if (comp.bin_file.options.skip_linker_dependencies) return; // This happens when an `extern "foo"` function is referenced by the stage1 backend. + if (comp.getTarget().os.tag == .wasi and mem.eql(u8, "wasi_snapshot_preview1", lib_name)) { + // Any referenced symbol from this lib, will be undefined until + // runtime as this lib is provided directly by the runtime. + return; + } + // If we haven't seen this library yet and we're targeting Windows, we need to queue up // a work item to produce the DLL import library for this. const gop = try comp.bin_file.options.system_libs.getOrPut(comp.gpa, lib_name); |
