aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/lmdb.BUILD
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/lmdb.BUILD')
-rw-r--r--third_party/lmdb.BUILD37
1 files changed, 37 insertions, 0 deletions
diff --git a/third_party/lmdb.BUILD b/third_party/lmdb.BUILD
new file mode 100644
index 0000000000..7c6e3dc3f0
--- /dev/null
+++ b/third_party/lmdb.BUILD
@@ -0,0 +1,37 @@
+# Description:
+# LMDB is the Lightning Memory-mapped Database.
+
+licenses(["notice"]) # OpenLDAP Public License
+
+exports_files(["LICENSE"])
+
+cc_library(
+ name = "lmdb",
+ srcs = [
+ "mdb.c",
+ "midl.c",
+ ],
+ hdrs = [
+ "lmdb.h",
+ "midl.h",
+ ],
+ copts = [
+ "-w",
+ ],
+ linkopts = select({
+ ":windows": ["-Wl,advapi32.lib"], # InitializeSecurityDescriptor, SetSecurityDescriptorDacl
+ ":windows_msvc": ["-Wl,advapi32.lib"],
+ "//conditions:default": ["-lpthread"],
+ }),
+ visibility = ["//visibility:public"],
+)
+
+config_setting(
+ name = "windows",
+ values = {"cpu": "x64_windows"},
+)
+
+config_setting(
+ name = "windows_msvc",
+ values = {"cpu": "x64_windows_msvc"},
+)