aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/ninja/Ninja.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp
index 7c1de91..4e94fcf 100644
--- a/backend/ninja/Ninja.cpp
+++ b/backend/ninja/Ninja.cpp
@@ -663,7 +663,8 @@ namespace backend
{
case Compiler::GCC:
{
- result += " LINK_ARGS = '-Wl,--no-undefined,--as-needed' ";
+ // TODO: Add flag to disable -ldl (dlopen, dlclose...)
+ result += " LINK_ARGS = '-Wl,--no-undefined,--as-needed' -ldl ";
break;
}
case Compiler::MSVC:
@@ -720,7 +721,7 @@ namespace backend
result += ".so: " + buildJob + " ";
result += join(objectNames, " ");
result += "\n";
- result += " LINK_ARGS = '-Wl,--no-undefined,--as-needed' ";
+ result += " LINK_ARGS = '-Wl,--no-undefined,--as-needed' -ldl ";
projectGeneratedBinary += "lib" + config.getPackageName() + ".so";
break;
}