From 666e8799251452f74ca97b4a6a930c7b3d0ce553 Mon Sep 17 00:00:00 2001 From: Shritesh Bhattarai Date: Wed, 10 Apr 2019 17:14:44 -0500 Subject: Build compiler_rt for WASM exe --- src/link.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/link.cpp') diff --git a/src/link.cpp b/src/link.cpp index d6093581f7..70f91f2b8e 100644 --- a/src/link.cpp +++ b/src/link.cpp @@ -1101,6 +1101,16 @@ static void construct_linker_job_wasm(LinkJob *lj) { for (size_t i = 0; i < g->link_objects.length; i += 1) { lj->args.append((const char *)buf_ptr(g->link_objects.at(i))); } + + if (g->out_type == OutTypeExe) { + if (g->libc_link_lib == nullptr) { + Buf *builtin_a_path = build_a(g, "builtin"); + lj->args.append(buf_ptr(builtin_a_path)); + } + + Buf *compiler_rt_o_path = build_compiler_rt(g); + lj->args.append(buf_ptr(compiler_rt_o_path)); + } } static void coff_append_machine_arg(CodeGen *g, ZigList *list) { -- cgit v1.2.3