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
69 lines (46 loc) · 2.25 KB
/
Copy pathMODULE.bazel
File metadata and controls
69 lines (46 loc) · 2.25 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
"""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")
link_hack = use_repo_rule("//bazel/internal:link_hack.bzl", "link_hack")
link_hack(
name = "build_bazel_rules_android", # See link_hack.bzl for details
)
register_toolchains(
"@mojo_toolchains//...",
"//bazel/internal/cc-toolchain:all",
"//bazel/internal:mojo_copts_toolchain",
)
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.
bazel_dep(name = "zlib-ng", version = "2.3.3", repo_name = "llvm_zlib")
bazel_dep(name = "zstd", version = "1.5.7.bcr.1", repo_name = "llvm_zstd")
# NOTE: These versions don't particularly match what modular uses internally, this is only used for test dependencies
LLVM_COMMIT = "afac572cd4c58b02ebe9a72c04f63a91dccc7901"
LLVM_SHA = "8d10cdc806b01b96d0ff925ee096cda508cd8b01b158f366f9db3af1318cdb44"
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")
cfg_workaround = use_repo_rule("//bazel/internal:cfg_workaround.bzl", "cfg_workaround")
cfg_workaround(name = "cfg_workaround.bzl")