| ... | ... | @@ -356,6 +356,21 @@ static void construct_linker_job_mingw(LinkJob *lj) { |
| 356 | 356 | |
| 357 | 357 | lj->args.append((const char *)buf_ptr(&lj->out_file_o)); |
| 358 | 358 | |
| 359 | if (g->is_test_build) { |
| 360 | const char *test_runner_name = g->link_libc ? "test_runner_libc" : "test_runner_nolibc"; |
| 361 | Buf *test_runner_o_path = build_o(g, test_runner_name); |
| 362 | lj->args.append(buf_ptr(test_runner_o_path)); |
| 363 | } |
| 364 | |
| 365 | if (!g->link_libc && (g->out_type == OutTypeExe || g->out_type == OutTypeLib)) { |
| 366 | Buf *builtin_o_path = build_o(g, "builtin"); |
| 367 | lj->args.append(buf_ptr(builtin_o_path)); |
| 368 | |
| 369 | Buf *compiler_rt_o_path = build_o(g, "compiler_rt"); |
| 370 | lj->args.append(buf_ptr(compiler_rt_o_path)); |
| 371 | } |
| 372 | |
| 373 | |
| 359 | 374 | for (int i = 0; i < g->link_libs.length; i += 1) { |
| 360 | 375 | Buf *link_lib = g->link_libs.at(i); |
| 361 | 376 | Buf *arg = buf_sprintf("-l%s", buf_ptr(link_lib)); |