-
Notifications
You must be signed in to change notification settings - Fork 0
/
MODULE.bazel
94 lines (84 loc) · 3.92 KB
/
MODULE.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
###############################################################################
# Bazel now uses Bzlmod by default to manage external dependencies.
# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel.
#
# For more details, please check https://github.com/bazelbuild/bazel/issues/18958
###############################################################################
"""small-db-v2 is an experimental project for studying of ACID / Distributed ACID"""
# ================================================================================ #
# Hedron's Compile Commands Extractor for Bazel
# https://github.com/hedronvision/bazel-compile-commands-extractor
# ================================================================================ #
bazel_dep(name = "hedron_compile_commands", dev_dependency = True)
git_override(
module_name = "hedron_compile_commands",
remote = "https://github.com/hedronvision/bazel-compile-commands-extractor.git",
# commit = "0e990032f3c5a866e72615cf67e5ce22186dcb97",
commit = "4f28899228fb3ad0126897876f147ca15026151e",
# Replace the commit hash (above) with the latest (https://github.com/hedronvision/bazel-compile-commands-extractor/commits/main).
# Even better, set up Renovate and let it do the work for you (see "Suggestion: Updates" in the README).
)
# ================================================================================ #
# External Dependencies
#
# Note that the library path is different when using WORKSPACE and MODULE.bazel.
# When importing the external library "liburing" using WORKSPACE, the library path is:
# "bazel-<workspace-name>/external/liburing"
# With MODULE.bazel (Bazlmod), the path becomes:
# "bazel-<workspace-name>/external/_main~_repo_rules~liburing"
# ================================================================================ #
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# A generic content for all http_archive rules.
_ALL_CONTENT = """\
filegroup(
name = "all",
srcs = glob(["**"]),
visibility = ["//visibility:public"],
)
"""
http_archive(
name = "arrow",
build_file_content = _ALL_CONTENT,
strip_prefix = "arrow-apache-arrow-18.0.0",
urls = ["https://github.com/apache/arrow/archive/refs/tags/apache-arrow-18.0.0.tar.gz"],
integrity = "sha256-nEc/LJkUxZq1cXYclJfPDlz9PqM193gszGEh9cuZrps=",
)
http_archive(
name = "rocksdb",
build_file_content = _ALL_CONTENT,
strip_prefix = "rocksdb-9.7.4",
urls = ["https://github.com/facebook/rocksdb/archive/refs/tags/v9.7.4.tar.gz"],
)
http_archive(
name = "spdlog",
build_file_content = _ALL_CONTENT,
strip_prefix = "spdlog-1.15.0",
urls = ["https://github.com/gabime/spdlog/archive/refs/tags/v1.15.0.tar.gz"],
integrity = "sha256-mWJkjJtPGnu8dv2NkXJVW60Ycf2xT/T4Qu+HlJaCyqU=",
)
http_archive(
name = "postgres",
build_file_content = _ALL_CONTENT,
strip_prefix = "postgres-REL_17_1",
urls = ["https://github.com/postgres/postgres/archive/refs/tags/REL_17_1.tar.gz"],
)
# we use a forked version of libpg_query since the origin's "make install" doesn't work
# with bazel
http_archive(
name = "libpg_query",
build_file_content = _ALL_CONTENT,
# strip_prefix = "libpg_query-17-6.0.0",
# urls = ["https://github.com/pganalyze/libpg_query/archive/refs/tags/17-6.0.0.tar.gz"],
strip_prefix = "libpg_query-xiaochen-17-6.0.0",
urls = ["https://github.com/small-db/libpg_query/archive/refs/tags/xiaochen-17-6.0.0.tar.gz"],
integrity = "sha256-6E6WccCYz2mLtA2gj5q8Vq+lMi4OOcmrB1Gc3M1HLQc=",
)
# ================================================================================ #
# custom toolchain
# ================================================================================ #
bazel_dep(name = "platforms", version = "0.0.10")
register_toolchains(
"//toolchain:xc_toolchain_clang20",
"//toolchain:xc_toolchain_gcc13",
# "//toolchain:xc_toolchain_default",
)