Build compiler_rt for WASM exe

This commit is contained in:
Shritesh Bhattarai 2019-04-10 17:14:44 -05:00 committed by Andrew Kelley
parent a71bfc249d
commit 666e879925

View File

@ -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<const char *> *list) {