Commit 94e0871603

Shritesh Bhattarai <shritesh@shritesh.com>
2019-04-14 07:03:32
wasi: don't pass --no-entry to linker
1 parent ecd0f89
Changed files (1)
src/link.cpp
@@ -1091,7 +1091,9 @@ static void construct_linker_job_wasm(LinkJob *lj) {
     CodeGen *g = lj->codegen;
 
     lj->args.append("-error-limit=0");
-    lj->args.append("--no-entry");  // So lld doesn't look for _start.
+    if (g->zig_target->os != OsWASI) {
+	    lj->args.append("--no-entry");  // So lld doesn't look for _start.
+    }
     lj->args.append("--allow-undefined");
     lj->args.append("--export-all");
     lj->args.append("-o");