aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorCharlie Root <root@dec05eba.my.domain>2018-09-30 23:44:13 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-06 07:39:33 +0200
commit0b09e97d0d6163b5a898f5642505ee12dd5ef30e (patch)
tree6464ce5279090cf99aa957aaca1faf68c50db095 /backend
parent147188af8356d21fb9720308ef4912e1f3a22a15 (diff)
Add OpenBSD support
Diffstat (limited to 'backend')
-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: