aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/meson.build
diff options
context:
space:
mode:
authorArtemis Tosini <lix@artem.ist>2024-04-22 17:32:21 +0000
committerArtemis Tosini <lix@artem.ist>2024-04-23 16:17:05 +0000
commitb247ef72dc7bcc857288c0ddcceb3e42f76a78f1 (patch)
tree01ec226e6f1e030797bde73bac219c2eb87e7c00 /src/libstore/meson.build
parentc8c838381d8e76450ffd57b778bb28217b32084d (diff)
libstore: Create platform LocalStore subclasses
This creates new subclasses of LocalStore for each OS to include platform-specific functionality. Currently this just includes garbage collector roots but it could be extended to sandboxing as well. In order to make sure that the generic LocalStore is not accidentally constructed, its constructor is protected. A Fallback is provided which implements no functionality except constructors. Change-Id: I836a28e90b68309873f75afb83e0f1b2e2c89fb3
Diffstat (limited to 'src/libstore/meson.build')
-rw-r--r--src/libstore/meson.build9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libstore/meson.build b/src/libstore/meson.build
index e1c6c267a..0deedea42 100644
--- a/src/libstore/meson.build
+++ b/src/libstore/meson.build
@@ -66,6 +66,7 @@ libstore_sources = files(
'path-with-outputs.cc',
'path.cc',
'pathlocks.cc',
+ 'platform.cc',
'profiles.cc',
'realisation.cc',
'remote-fs-accessor.cc',
@@ -158,6 +159,14 @@ libstore_headers = files(
'worker-protocol.hh',
)
+if host_machine.system() == 'linux'
+ libstore_sources += files('platform/linux.cc')
+ libstore_headers += files('platform/linux.hh')
+else
+ libstore_sources += files('platform/fallback.cc')
+ libstore_headers += files('platform/fallback.hh')
+endif
+
# These variables (aside from LSOF) are created pseudo-dynamically, near the beginning of
# the top-level meson.build. Aside from prefix itself, each of these was
# made into an absolute path by joining it with prefix, unless it was already