forked from modular/modular
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMODULE.bazel
More file actions
97 lines (73 loc) · 3.12 KB
/
MODULE.bazel
File metadata and controls
97 lines (73 loc) · 3.12 KB
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
95
96
97
"""Define bazel dependencies."""
module(
name = "modular",
version = "0",
)
include("//bazel:common.MODULE.bazel")
mojo_aliases = use_repo_rule("//bazel:mojo_aliases.bzl", "mojo_aliases")
mojo_aliases(name = "mojo")
mblack_alias = use_repo_rule("//bazel:mblack_alias.bzl", "mblack_alias")
mblack_alias(name = "mblack")
modular_wheel_repository = use_repo_rule("//bazel:modular_wheel_repository.bzl", "modular_wheel_repository")
modular_wheel_repository(name = "modular_wheel")
macos_sysroot_repository = use_repo_rule("//bazel/internal/cc-toolchain:macos_sysroot_repository.bzl", "macos_sysroot_repository")
macos_sysroot_repository(name = "sysroot-macos")
include("//bazel:mojo.MODULE.bazel")
register_toolchains(
"@mojo_toolchains//...",
"//bazel/internal/cc-toolchain:all",
)
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# This section is derived from the full LLVM workspace, available at
# llvm-project/utils/bazel/WORKSPACE. If there are changes in
# LLVM that require updating these dependencies, this file may also need to
# be updated in the future.
http_archive(
name = "llvm_zlib",
build_file = "@llvm-raw//utils/bazel/third_party_build:zlib-ng.BUILD",
dev_dependency = True,
sha256 = "e36bb346c00472a1f9ff2a0a4643e590a254be6379da7cddd9daeb9a7f296731",
strip_prefix = "zlib-ng-2.0.7",
urls = [
"https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.0.7.zip",
],
)
http_archive(
name = "llvm_zstd",
build_file = "@llvm-raw//utils/bazel/third_party_build:zstd.BUILD",
dev_dependency = True,
sha256 = "7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0",
strip_prefix = "zstd-1.5.2",
urls = [
"https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz",
],
)
# NOTE: These versions don't particularly match what modular uses internally, this is only used for test dependencies
LLVM_COMMIT = "b76089c7f3d6593d2e2c83db7dbf4965b656bd8c"
LLVM_SHA = "0d6a20eb8546cfc2693bbdc2b4a0c0eca48856b29103660d6c0a1611082af3ba"
http_archive(
name = "llvm-raw",
build_file_content = "exports_files(glob([\"**\"]))",
dev_dependency = True,
sha256 = LLVM_SHA,
strip_prefix = "llvm-project-{}".format(LLVM_COMMIT),
url = "https://github.com/llvm/llvm-project/archive/{}.tar.gz".format(LLVM_COMMIT),
)
llvm_configure = use_repo_rule("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure")
llvm_configure(name = "llvm-project")
npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm", dev_dependency = True)
npm.npm_translate_lock(
name = "npm",
data = ["//bazel/lint:package.json"],
lifecycle_hooks_exclude = [
"cpu-features",
],
npm_package_lock = "//bazel/lint:package-lock.json",
pnpm_lock = "//bazel/lint:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
use_repo(npm, "npm")
pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm", dev_dependency = True)
use_repo(pnpm, "pnpm")
cfg_workaround = use_repo_rule("//bazel/internal:cfg_workaround.bzl", "cfg_workaround")
cfg_workaround(name = "cfg_workaround.bzl")