aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/s3-binary-cache-store.cc
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2024-06-05 06:02:18 +0200
committerRebecca Turner <rbt@sent.as>2024-08-26 16:27:31 -0700
commit4f02255c205378427f5831463c0c07e45382b2b2 (patch)
tree875efcf49a86ced24b37d72587bc4dfb153c4460 /src/libstore/s3-binary-cache-store.cc
parentca08f1217d8779971d4f2b306a19ad5622360372 (diff)
libstore: remove static initializers for Store registrations
Ref #359. Change-Id: Ia45530ddee25fa9fc399ff10738bb0d8bbc8b221
Diffstat (limited to 'src/libstore/s3-binary-cache-store.cc')
-rw-r--r--src/libstore/s3-binary-cache-store.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libstore/s3-binary-cache-store.cc b/src/libstore/s3-binary-cache-store.cc
index ffebfda8d..921a2e556 100644
--- a/src/libstore/s3-binary-cache-store.cc
+++ b/src/libstore/s3-binary-cache-store.cc
@@ -526,8 +526,14 @@ struct S3BinaryCacheStoreImpl : virtual S3BinaryCacheStoreConfig, public virtual
};
-static RegisterStoreImplementation<S3BinaryCacheStoreImpl, S3BinaryCacheStoreConfig> regS3BinaryCacheStore;
+void registerS3BinaryCacheStore() {
+ StoreImplementations::add<S3BinaryCacheStoreImpl, S3BinaryCacheStoreConfig>();
+}
}
+#else
+namespace nix {
+void registerS3BinaryCacheStore() {}
+}
#endif