authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2021-06-07 16:08:43+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2021-06-09 01:25:38+02:00
log95745f77da6cd3ca30aea6aa47253c1e0a4f5a75
tree7a43efe2587713a04f777acf00ba5fe2531bc817
parent4e4722a65e3bc3d6bb4518df3082ffea7c2a7c5d

wasi: skip adding wasi_snapshot_preview1 as lib dep in stage1


1 files changed, 6 insertions(+), 0 deletions(-)

src/Compilation.zig+6
......@@ -4157,6 +4157,12 @@ pub fn stage1AddLinkLib(comp: *Compilation, lib_name: []const u8) !void {
41574157 if (comp.bin_file.options.skip_linker_dependencies) return;
41584158
41594159 // This happens when an `extern "foo"` function is referenced by the stage1 backend.
4160 if (comp.getTarget().os.tag == .wasi and mem.eql(u8, "wasi_snapshot_preview1", lib_name)) {
4161 // Any referenced symbol from this lib, will be undefined until
4162 // runtime as this lib is provided directly by the runtime.
4163 return;
4164 }
4165
41604166 // If we haven't seen this library yet and we're targeting Windows, we need to queue up
41614167 // a work item to produce the DLL import library for this.
41624168 const gop = try comp.bin_file.options.system_libs.getOrPut(comp.gpa, lib_name);