commit 94e0871603add796e87ac53a3271cf5b9b3d6b0e (tree) parent ecd0f8925447074307e8795bb8d6f9f6277a1a26 Author: Shritesh Bhattarai <shritesh@shritesh.com> Date: Sun, 14 Apr 2019 00:03:32 -0500 wasi: don't pass --no-entry to linker Diffstat:
| M | src/link.cpp | | | 4 | +++- |
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/link.cpp b/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");