aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-01-07 05:13:30 +0100
committerdec05eba <dec05eba@protonmail.com>2018-01-07 05:14:40 +0100
commit82df40bd1fc82958ef90e7c917ce3eec382d4309 (patch)
treeb424c23a813973cdbc887b4dd6c353558bd4e88c /backend
parente92c713dfd5ac53a0db741956b897dfa4386692b (diff)
Add 'ldl' linking flag on linux
This enabled the use of dynamic lib functions such as dlopen, dlclose. Should there be a flag to disable this?
Diffstat (limited to 'backend')
-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;
}