From 99520c4e6936b69e7489262bc35a70300366d395 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 17 Feb 2020 19:49:19 -0500 Subject: [PATCH] target_os_requires_libc implies dynamic linking --- src/codegen.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/codegen.cpp b/src/codegen.cpp index 12b49ab2ae..41a353ef14 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -8375,6 +8375,8 @@ static bool detect_dynamic_link(CodeGen *g) { return true; if (g->zig_target->os == OsFreestanding) return false; + if (target_os_requires_libc(g->zig_target->os)) + return true; if (g->libc_link_lib != nullptr && target_is_glibc(g->zig_target)) return true; // If there are no dynamic libraries then we can disable dynamic linking.