| ... | @@ -8375,6 +8375,8 @@ static bool detect_dynamic_link(CodeGen *g) { | ... | @@ -8375,6 +8375,8 @@ static bool detect_dynamic_link(CodeGen *g) { |
| 8375 | return true; | 8375 | return true; |
| 8376 | if (g->zig_target->os == OsFreestanding) | 8376 | if (g->zig_target->os == OsFreestanding) |
| 8377 | return false; | 8377 | return false; |
| | 8378 | if (target_os_requires_libc(g->zig_target->os)) |
| | 8379 | return true; |
| 8378 | if (g->libc_link_lib != nullptr && target_is_glibc(g->zig_target)) | 8380 | if (g->libc_link_lib != nullptr && target_is_glibc(g->zig_target)) |
| 8379 | return true; | 8381 | return true; |
| 8380 | // If there are no dynamic libraries then we can disable dynamic linking. | 8382 | // If there are no dynamic libraries then we can disable dynamic linking. |