aboutsummaryrefslogtreecommitdiff
path: root/backend/ninja
diff options
context:
space:
mode:
Diffstat (limited to 'backend/ninja')
-rw-r--r--backend/ninja/Ninja.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp
index 3d71574..0c9cf0e 100644
--- a/backend/ninja/Ninja.cpp
+++ b/backend/ninja/Ninja.cpp
@@ -1150,10 +1150,16 @@ namespace backend
}
// TODO: Add flag to disable -ldl and -lm (dlopen, dlclose, floor, max, ...)
+#if OS_TYPE == OS_TYPE_OPENBSD
+ buildExeArgs.insert(buildExeArgs.end(), {
+ ninja::NinjaArg::createRaw("-lm")
+ });
+#else
buildExeArgs.insert(buildExeArgs.end(), {
ninja::NinjaArg::createRaw("-ldl"),
ninja::NinjaArg::createRaw("-lm")
});
+#endif
break;
}
case Compiler::MSVC:
@@ -1338,10 +1344,16 @@ namespace backend
}
// TODO: Add flag to disable -ldl and -lm (dlopen, dlclose, floor, max, ...)
+#if OS_TYPE == OS_TYPE_OPENBSD
+ buildDynamicArgs.insert(buildDynamicArgs.end(), {
+ ninja::NinjaArg::createRaw("-lm")
+ });
+#else
buildDynamicArgs.insert(buildDynamicArgs.end(), {
ninja::NinjaArg::createRaw("-ldl"),
ninja::NinjaArg::createRaw("-lm")
});
+#endif
break;
}
case Compiler::MSVC: