| ... | ... | @@ -1526,15 +1526,15 @@ static void construct_linker_job_macho(LinkJob *lj) { |
| 1526 | 1526 | if (g->zig_target->is_native) { |
| 1527 | 1527 | for (size_t lib_i = 0; lib_i < g->link_libs_list.length; lib_i += 1) { |
| 1528 | 1528 | LinkLib *link_lib = g->link_libs_list.at(lib_i); |
| 1529 | | if (buf_eql_str(link_lib->name, "c")) { |
| 1529 | if (target_is_libc_lib_name(g->zig_target, buf_ptr(link_lib->name))) { |
| 1530 | // handled by libSystem |
| 1530 | 1531 | continue; |
| 1532 | } |
| 1533 | if (strchr(buf_ptr(link_lib->name), '/') == nullptr) { |
| 1534 | Buf *arg = buf_sprintf("-l%s", buf_ptr(link_lib->name)); |
| 1535 | lj->args.append(buf_ptr(arg)); |
| 1531 | 1536 | } else { |
| 1532 | | if (strchr(buf_ptr(link_lib->name), '/') == nullptr) { |
| 1533 | | Buf *arg = buf_sprintf("-l%s", buf_ptr(link_lib->name)); |
| 1534 | | lj->args.append(buf_ptr(arg)); |
| 1535 | | } else { |
| 1536 | | lj->args.append(buf_ptr(link_lib->name)); |
| 1537 | | } |
| 1537 | lj->args.append(buf_ptr(link_lib->name)); |
| 1538 | 1538 | } |
| 1539 | 1539 | } |
| 1540 | 1540 | // on Darwin, libSystem has libc in it, but also you have to use it |