-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathWORKSPACE.bazel
More file actions
123 lines (109 loc) · 3.36 KB
/
WORKSPACE.bazel
File metadata and controls
123 lines (109 loc) · 3.36 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
##### Simple, optional repos in the local filesystem:
##### These are only available after running setup_mercury.sh
new_local_repository(
name = "mercury",
path = "external_repos/opt/mercury",
build_file_content = """
cc_library(
name = "mercury",
hdrs = glob(["**/*.h", "**/*.tcc"]),
strip_include_prefix = "include/",
includes = ["include/"],
visibility = ["//visibility:public"],
deps = [
":mercury_static",
":mercury_na_static",
":mercury_util_static",
"@libfabric//:libfabric",
],
defines = [
"WITH_MERCURY",
],
linkopts = ["-lm","-lpthread"],
)
cc_import(
name = "mercury_static",
static_library = "lib/libmercury.a",
)
cc_import(
name = "mercury_hl_static",
static_library = "lib/libmercury_hl.a",
)
cc_import(
name = "mercury_util_static",
static_library = "lib/libmercury_util.a",
)
cc_import(
name = "mercury_na_static",
static_library = "lib/libna.a",
)
cc_import(
name = "mercury_mchecksum_static",
static_library = "lib/libmchecksum.a",
)
""",
)
new_local_repository(
name = "libfabric",
path = "external_repos/opt/libfabric",
build_file_content = """
cc_library(
name = "libfabric",
hdrs = glob(["**/*.h", "**/*.tcc"]),
strip_include_prefix = "include/",
includes = ["include/"],
visibility = ["//visibility:public"],
deps = [":libfabric_static"],
linkopts = [
"-lm",
"-lnuma",
"-luuid",
"-lpthread",
"-lrt",
"-ldl",
"-latomic",
],
)
cc_import(
name = "libfabric_static",
static_library = "lib/libfabric.a",
)
""",
)
##### Helper function to fetch code via http:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
##### Http repositories that do not require invoking any imported functions:
http_archive(
name = "com_google_benchmark",
sha256 = "2aab2980d0376137f969d92848fbb68216abb07633034534fc8c65cc4e7a0e93",
strip_prefix = "benchmark-1.8.2",
url = "https://github.com/google/benchmark/archive/refs/tags/v1.8.2.tar.gz",
)
http_archive(
name = "homa_module",
sha256 = "ab578b20263ab5e5a8e3d1b9db85ddec05523a178eced4773e47edb00035c430",
strip_prefix = "HomaModule-1c3346972c00824c6422ec23ba3c40c87b6e5c76",
url = "https://github.com/PlatformLab/HomaModule/archive/1c3346972c00824c6422ec23ba3c40c87b6e5c76.tar.gz",
build_file = "@//:homa_module.BUILD",
)
##### GRPC rules: This imports a lot of dependencies for us via
##### grpc_deps() and grpc_extra_deps().
http_archive(
name = "com_github_grpc_grpc",
strip_prefix = "grpc-1.72.2",
integrity = "sha256-rhSg3iIkhf1uO69SAox0rL2a2NaFyBNYBAHTgyz66fE=",
url = "https://github.com/grpc/grpc/archive/refs/tags/v1.72.2.tar.gz",
)
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
grpc_deps()
load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps")
grpc_extra_deps()
##### Boost rules: Imports more deps via boost_deps()
http_archive(
name = "com_github_nelhage_rules_boost",
sha256 = "1198cb810d18d2a86abbd4c3d71665375e2c6a2ba4044b4f9d7b2f28e6ed898e",
strip_prefix = "rules_boost-33461a3c666af36d7a080e4fd6f554725df44132",
url = "https://github.com/nelhage/rules_boost/archive/33461a3c666af36d7a080e4fd6f554725df44132.tar.gz",
)
load("@com_github_nelhage_rules_boost//:boost/boost.bzl", "boost_deps")
boost_deps()