aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-02-17 19:49:19 -0500
committerAndrew Kelley <andrew@ziglang.org>2020-02-17 19:49:19 -0500
commit99520c4e6936b69e7489262bc35a70300366d395 (patch)
tree0b7636cd90657be10b8e023c90e52164861c2110 /src/codegen.cpp
parent5a4e8c779a713d7b07cec262b07afd6883684c98 (diff)
downloadzig-99520c4e6936b69e7489262bc35a70300366d395.tar.gz
zig-99520c4e6936b69e7489262bc35a70300366d395.zip
target_os_requires_libc implies dynamic linking
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp2
1 files changed, 2 insertions, 0 deletions
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.