| ... | @@ -1903,7 +1903,7 @@ static void construct_linker_job_elf(LinkJob *lj) { | ... | @@ -1903,7 +1903,7 @@ static void construct_linker_job_elf(LinkJob *lj) { |
| 1903 | // libc is linked specially | 1903 | // libc is linked specially |
| 1904 | continue; | 1904 | continue; |
| 1905 | } | 1905 | } |
| 1906 | if (buf_eql_str(link_lib->name, "c++") || buf_eql_str(link_lib->name, "c++abi")) { | 1906 | if (target_is_libcpp_lib_name(g->zig_target, buf_ptr(link_lib->name))) { |
| 1907 | // libc++ is linked specially | 1907 | // libc++ is linked specially |
| 1908 | continue; | 1908 | continue; |
| 1909 | } | 1909 | } |
| ... | @@ -2470,7 +2470,12 @@ static void construct_linker_job_coff(LinkJob *lj) { | ... | @@ -2470,7 +2470,12 @@ static void construct_linker_job_coff(LinkJob *lj) { |
| 2470 | if (buf_eql_str(link_lib->name, "c")) { | 2470 | if (buf_eql_str(link_lib->name, "c")) { |
| 2471 | continue; | 2471 | continue; |
| 2472 | } | 2472 | } |
| 2473 | if (buf_eql_str(link_lib->name, "c++") || buf_eql_str(link_lib->name, "c++abi")) { | 2473 | if (target_is_libcpp_lib_name(g->zig_target, buf_ptr(link_lib->name))) { |
| | 2474 | // libc++ is linked specially |
| | 2475 | continue; |
| | 2476 | } |
| | 2477 | if (g->libc == nullptr && target_is_libc_lib_name(g->zig_target, buf_ptr(link_lib->name))) { |
| | 2478 | // these libraries are always linked below when targeting glibc |
| 2474 | continue; | 2479 | continue; |
| 2475 | } | 2480 | } |
| 2476 | bool is_sys_lib = is_mingw_link_lib(link_lib->name); | 2481 | bool is_sys_lib = is_mingw_link_lib(link_lib->name); |