-
Notifications
You must be signed in to change notification settings - Fork 305
Expand file tree
/
Copy pathrepositories.bzl
More file actions
82 lines (72 loc) · 3.35 KB
/
repositories.bzl
File metadata and controls
82 lines (72 loc) · 3.35 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
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
load("//third_party:bazel.bzl", "bazel_sha256", "bazel_version")
load("//third_party:bazel_skylib.bzl", "skylib_sha256", "skylib_version")
def copybara_repositories():
return
def _non_module_deps(_):
return
non_module_deps = module_extension(implementation = _non_module_deps)
def _async_profiler_repos(ctx):
http_file(
name = "async_profiler",
downloaded_file_path = "async-profiler.jar",
# At commit f0ceda6356f05b7ad0a6593670c8c113113bf0b3 (2024-12-09).
sha256 = "da95a5292fb203966196ecb68a39a8c26ad7276aeef642ec1de872513be1d8b3",
urls = ["https://mirror.bazel.build/github.com/async-profiler/async-profiler/releases/download/nightly/async-profiler.jar"],
)
_ASYNC_PROFILER_BUILD_TEMPLATE = """
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
copy_file(
name = "libasyncProfiler",
src = "libasyncProfiler.{ext}",
out = "{tag}/libasyncProfiler.so",
visibility = ["//visibility:public"],
)
"""
http_archive(
name = "async_profiler_linux_arm64",
build_file_content = _ASYNC_PROFILER_BUILD_TEMPLATE.format(
ext = "so",
tag = "linux-arm64",
),
sha256 = "7c6243bb91272a2797acb8cc44acf3e406e0b658a94d90d9391ca375fc961857",
strip_prefix = "async-profiler-3.0-f0ceda6-linux-arm64/lib",
urls = ["https://mirror.bazel.build/github.com/async-profiler/async-profiler/releases/download/nightly/async-profiler-3.0-f0ceda6-linux-arm64.tar.gz"],
)
http_archive(
name = "async_profiler_linux_x64",
build_file_content = _ASYNC_PROFILER_BUILD_TEMPLATE.format(
ext = "so",
tag = "linux-x64",
),
sha256 = "448a3dc681375860eba2264d6cae7a848bd3f07f81f547a9ce58b742a1541d25",
strip_prefix = "async-profiler-3.0-f0ceda6-linux-x64/lib",
urls = ["https://mirror.bazel.build/github.com/async-profiler/async-profiler/releases/download/nightly/async-profiler-3.0-f0ceda6-linux-x64.tar.gz"],
)
http_archive(
name = "async_profiler_macos",
build_file_content = _ASYNC_PROFILER_BUILD_TEMPLATE.format(
ext = "dylib",
tag = "macos",
),
sha256 = "0651004c78d080f67763cddde6e1f58cd0d0c4cb0b57034beef80b450ff5adf2",
strip_prefix = "async-profiler-3.0-f0ceda6-macos/lib",
urls = ["https://mirror.bazel.build/github.com/async-profiler/async-profiler/releases/download/nightly/async-profiler-3.0-f0ceda6-macos.zip"],
)
# This is an extension (instead of use_repo_rule usages) only to create a
# lockfile entry for the distribution repo module extension.
async_profiler_repos = module_extension(_async_profiler_repos)