aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/platform.cc
diff options
context:
space:
mode:
authorArtemis Tosini <me@artem.ist>2024-07-20 03:18:39 +0000
committerArtemis Tosini <me@artem.ist>2024-07-23 17:49:33 +0000
commit53f3e39815c3357c6465963359e94a6318b54af7 (patch)
tree3a251fe37ec302e404f50a0fd6bbe6daa0b90646 /src/libstore/platform.cc
parent73c013a5df09a9edf7a6d2fa0be8349d89f856cd (diff)
libstore: Add FreeBSD findPlatformRoots
Use libprocstat to find garbage collector roots on FreeBSD. Tested working on a FreeBSD machine, although there is no CI yet Change-Id: Id36bac8c3de6cc4de94e2d76e9663dd4b76068a9
Diffstat (limited to 'src/libstore/platform.cc')
-rw-r--r--src/libstore/platform.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libstore/platform.cc b/src/libstore/platform.cc
index d10d33f0e..72757e39b 100644
--- a/src/libstore/platform.cc
+++ b/src/libstore/platform.cc
@@ -5,6 +5,8 @@
#include "platform/linux.hh"
#elif __APPLE__
#include "platform/darwin.hh"
+#elif __FreeBSD__
+#include "platform/freebsd.hh"
#else
#include "platform/fallback.hh"
#endif
@@ -16,6 +18,8 @@ std::shared_ptr<LocalStore> LocalStore::makeLocalStore(const Params & params)
return std::shared_ptr<LocalStore>(new LinuxLocalStore(params));
#elif __APPLE__
return std::shared_ptr<LocalStore>(new DarwinLocalStore(params));
+#elif __FreeBSD__
+ return std::shared_ptr<LocalStore>(new FreeBSDLocalStore(params));
#else
return std::shared_ptr<LocalStore>(new FallbackLocalStore(params));
#endif
@@ -32,6 +36,8 @@ std::shared_ptr<LocalDerivationGoal> LocalDerivationGoal::makeLocalDerivationGoa
return std::make_shared<LinuxLocalDerivationGoal>(drvPath, wantedOutputs, worker, buildMode);
#elif __APPLE__
return std::make_shared<DarwinLocalDerivationGoal>(drvPath, wantedOutputs, worker, buildMode);
+#elif __FreeBSD__
+ return std::make_shared<FreeBSDLocalDerivationGoal>(drvPath, wantedOutputs, worker, buildMode);
#else
return std::make_shared<FallbackLocalDerivationGoal>(drvPath, wantedOutputs, worker, buildMode);
#endif
@@ -53,6 +59,10 @@ std::shared_ptr<LocalDerivationGoal> LocalDerivationGoal::makeLocalDerivationGoa
return std::make_shared<DarwinLocalDerivationGoal>(
drvPath, drv, wantedOutputs, worker, buildMode
);
+#elif __FreeBSD__
+ return std::make_shared<FreeBSDLocalDerivationGoal>(
+ drvPath, drv, wantedOutputs, worker, buildMode
+ );
#else
return std::make_shared<FallbackLocalDerivationGoal>(
drvPath, drv, wantedOutputs, worker, buildMode