Skip to content

Commit 666e879

Browse files
shriteshandrewrk
authored andcommitted
Build compiler_rt for WASM exe
1 parent a71bfc2 commit 666e879

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/link.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,6 +1101,16 @@ static void construct_linker_job_wasm(LinkJob *lj) {
11011101
for (size_t i = 0; i < g->link_objects.length; i += 1) {
11021102
lj->args.append((const char *)buf_ptr(g->link_objects.at(i)));
11031103
}
1104+
1105+
if (g->out_type == OutTypeExe) {
1106+
if (g->libc_link_lib == nullptr) {
1107+
Buf *builtin_a_path = build_a(g, "builtin");
1108+
lj->args.append(buf_ptr(builtin_a_path));
1109+
}
1110+
1111+
Buf *compiler_rt_o_path = build_compiler_rt(g);
1112+
lj->args.append(buf_ptr(compiler_rt_o_path));
1113+
}
11041114
}
11051115

11061116
static void coff_append_machine_arg(CodeGen *g, ZigList<const char *> *list) {

0 commit comments

Comments
 (0)