Skip to content

Commit 99520c4

Browse files
committed
target_os_requires_libc implies dynamic linking
1 parent 5a4e8c7 commit 99520c4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/codegen.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8375,6 +8375,8 @@ static bool detect_dynamic_link(CodeGen *g) {
83758375
return true;
83768376
if (g->zig_target->os == OsFreestanding)
83778377
return false;
8378+
if (target_os_requires_libc(g->zig_target->os))
8379+
return true;
83788380
if (g->libc_link_lib != nullptr && target_is_glibc(g->zig_target))
83798381
return true;
83808382
// If there are no dynamic libraries then we can disable dynamic linking.

0 commit comments

Comments
 (0)