Skip to content

Commit df020c6

Browse files
committed
[bazel] Add simple MODULE.bazel
1 parent d8d80b6 commit df020c6

File tree

2 files changed

+482
-0
lines changed

2 files changed

+482
-0
lines changed

utils/bazel/MODULE.bazel

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
2+
# See https://llvm.org/LICENSE.txt for license information.
3+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4+
5+
"""bzlmod configuration for llvm-project"""
6+
7+
bazel_dep(name = "apple_support", version = "1.24.1", repo_name = "build_bazel_apple_support")
8+
bazel_dep(name = "bazel_skylib", version = "1.8.2")
9+
bazel_dep(name = "platforms", version = "1.0.0")
10+
bazel_dep(name = "rules_android", version = "0.6.6")
11+
bazel_dep(name = "rules_cc", version = "0.2.11")
12+
bazel_dep(name = "rules_foreign_cc", version = "0.15.1")
13+
bazel_dep(name = "rules_python", version = "1.6.3")
14+
bazel_dep(name = "rules_shell", version = "0.6.1")
15+
16+
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
17+
18+
new_local_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:local.bzl", "new_local_repository")
19+
20+
new_local_repository(
21+
name = "llvm-raw",
22+
build_file_content = "# empty",
23+
path = "../../",
24+
)
25+
26+
llvm_configure = use_repo_rule("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure")
27+
28+
llvm_configure(name = "llvm-project")
29+
30+
http_archive(
31+
name = "llvm_zlib",
32+
build_file = "@llvm-raw//utils/bazel/third_party_build:zlib-ng.BUILD",
33+
sha256 = "e36bb346c00472a1f9ff2a0a4643e590a254be6379da7cddd9daeb9a7f296731",
34+
strip_prefix = "zlib-ng-2.0.7",
35+
urls = [
36+
"https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.0.7.zip",
37+
],
38+
)
39+
40+
http_archive(
41+
name = "vulkan_headers",
42+
build_file = "@llvm-raw//utils/bazel/third_party_build:vulkan_headers.BUILD",
43+
sha256 = "19f491784ef0bc73caff877d11c96a48b946b5a1c805079d9006e3fbaa5c1895",
44+
strip_prefix = "Vulkan-Headers-9bd3f561bcee3f01d22912de10bb07ce4e23d378",
45+
urls = [
46+
"https://github.com/KhronosGroup/Vulkan-Headers/archive/9bd3f561bcee3f01d22912de10bb07ce4e23d378.tar.gz",
47+
],
48+
)
49+
50+
vulkan_sdk_setup = use_repo_rule("@llvm-raw//utils/bazel:vulkan_sdk.bzl", "vulkan_sdk_setup")
51+
52+
vulkan_sdk_setup(name = "vulkan_sdk_setup")
53+
54+
http_archive(
55+
name = "gmp",
56+
urls = [
57+
"https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz",
58+
"https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz",
59+
],
60+
build_file = "@llvm-raw//utils/bazel/third_party_build:gmp.BUILD",
61+
sha256 = "fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2",
62+
strip_prefix = "gmp-6.2.1",
63+
)
64+
65+
http_archive(
66+
name = "mpfr",
67+
urls = [
68+
"https://www.mpfr.org/mpfr-current/mpfr-4.2.2.tar.gz",
69+
],
70+
sha256 = "826cbb24610bd193f36fde172233fb8c009f3f5c2ad99f644d0dea2e16a20e42",
71+
strip_prefix = "mpfr-4.2.2",
72+
build_file = "@llvm-raw//utils/bazel/third_party_build:mpfr.BUILD",
73+
)
74+
75+
http_archive(
76+
name = "mpc",
77+
urls = [
78+
"https://ftp.gnu.org/gnu/mpc/mpc-1.3.1.tar.gz",
79+
],
80+
sha256 = "ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8",
81+
strip_prefix = "mpc-1.3.1",
82+
build_file = "@llvm-raw//utils/bazel/third_party_build:mpc.BUILD",
83+
)
84+
85+
http_archive(
86+
name = "pfm",
87+
urls = [
88+
"https://versaweb.dl.sourceforge.net/project/perfmon2/libpfm4/libpfm-4.13.0.tar.gz",
89+
],
90+
sha256 = "d18b97764c755528c1051d376e33545d0eb60c6ebf85680436813fa5b04cc3d1",
91+
strip_prefix = "libpfm-4.13.0",
92+
build_file = "@llvm-raw//utils/bazel/third_party_build:pfm.BUILD",
93+
)
94+
95+
http_archive(
96+
name = "llvm_zstd",
97+
build_file = "@llvm-raw//utils/bazel/third_party_build:zstd.BUILD",
98+
sha256 = "7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0",
99+
strip_prefix = "zstd-1.5.2",
100+
urls = [
101+
"https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz",
102+
],
103+
)
104+
105+
http_archive(
106+
name = "pybind11",
107+
url = "https://github.com/pybind/pybind11/archive/v2.10.3.zip",
108+
sha256 = "201966a61dc826f1b1879a24a3317a1ec9214a918c8eb035be2f30c3e9cfbdcb",
109+
strip_prefix = "pybind11-2.10.3",
110+
build_file = "@llvm-raw//utils/bazel/third_party_build:pybind.BUILD",
111+
)
112+
113+
http_archive(
114+
name = "pyyaml",
115+
url = "https://github.com/yaml/pyyaml/archive/refs/tags/5.1.zip",
116+
sha256 = "f0a35d7f282a6d6b1a4f3f3965ef5c124e30ed27a0088efb97c0977268fd671f",
117+
strip_prefix = "pyyaml-5.1/lib3",
118+
build_file = "@llvm-raw//utils/bazel/third_party_build:pyyaml.BUILD",
119+
)
120+
121+
http_archive(
122+
name = "robin_map",
123+
build_file = "@llvm-raw//utils/bazel/third_party_build:robin_map.BUILD",
124+
sha256 = "a8424ad3b0affd4c57ed26f0f3d8a29604f0e1f2ef2089f497f614b1c94c7236",
125+
strip_prefix = "robin-map-1.3.0",
126+
url = "https://github.com/Tessil/robin-map/archive/refs/tags/v1.3.0.tar.gz",
127+
)
128+
129+
http_archive(
130+
name = "nanobind",
131+
build_file = "@llvm-raw//utils/bazel/third_party_build:nanobind.BUILD",
132+
sha256 = "8ce3667dce3e64fc06bfb9b778b6f48731482362fb89a43da156632266cd5a90",
133+
strip_prefix = "nanobind-2.9.2",
134+
url = "https://github.com/wjakob/nanobind/archive/refs/tags/v2.9.2.tar.gz",
135+
)

0 commit comments

Comments
 (0)