|
9 | 9 | # instructions at https://github.com/3rdparty/bazel-rules-backward-cpp.
|
10 | 10 | ########################################################################
|
11 | 11 |
|
12 |
| -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository", "new_git_repository") |
13 | 12 | load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
|
14 | 13 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
| 14 | +load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository") |
15 | 15 |
|
16 |
| -def repos(external = True, repo_mapping = {}): |
| 16 | +_ALL_CONTENT = """\ |
| 17 | +filegroup( |
| 18 | + name = "all", |
| 19 | + srcs = glob(["**"]), |
| 20 | + visibility = ["//visibility:public"], |
| 21 | +) |
| 22 | +""" |
| 23 | + |
| 24 | +def repos(external = True, repo_mapping = {}, workspace_prefix = ""): |
17 | 25 | maybe(
|
18 |
| - git_repository, |
19 |
| - name = "com_github_3rdparty_bazel_rules_backward_cpp", |
20 |
| - remote = "https://github.com/3rdparty/bazel-rules-backward-cpp", |
21 |
| - commit = "69449957a41619e9b8b8be2e9bfaca2ac0642760", |
22 |
| - shallow_since = "1658132015 +0300", |
| 26 | + http_archive, |
| 27 | + name = "rules_foreign_cc", |
| 28 | + url = "https://github.com/bazelbuild/rules_foreign_cc/archive/refs/tags/0.9.0.tar.gz", |
| 29 | + sha256 = "2a4d07cd64b0719b39a7c12218a3e507672b82a97b98c6a89d38565894cf7c51", |
| 30 | + strip_prefix = "rules_foreign_cc-0.9.0", |
23 | 31 | repo_mapping = repo_mapping,
|
24 | 32 | )
|
25 | 33 |
|
| 34 | + # Get version. 'binutils' doesn't compile |
| 35 | + # without this binary. |
| 36 | + maybe( |
| 37 | + http_archive, |
| 38 | + name = "com_github_texinfo", |
| 39 | + url = "https://ftp.gnu.org/gnu/texinfo/texinfo-6.8.tar.xz", |
| 40 | + build_file_content = _ALL_CONTENT, |
| 41 | + sha256 = "8eb753ed28bca21f8f56c1a180362aed789229bd62fff58bf8368e9beb59fec4", |
| 42 | + strip_prefix = "texinfo-6.8", |
| 43 | + ) |
| 44 | + |
| 45 | + # Get binutils to read the debug info. |
| 46 | + maybe( |
| 47 | + http_archive, |
| 48 | + name = "com_github_binutils", |
| 49 | + url = "https://ftp.gnu.org/gnu/binutils/binutils-2.38.tar.gz", |
| 50 | + build_file_content = _ALL_CONTENT, |
| 51 | + sha256 = "b3f1dc5b17e75328f19bd88250bee2ef9f91fc8cbb7bd48bdb31390338636052", |
| 52 | + strip_prefix = "binutils-2.38", |
| 53 | + ) |
| 54 | + |
| 55 | + # Get libunwind to unwind the stack. (There is no need |
| 56 | + # in this library on macOS, because on macOS clang provides a libunwind API |
| 57 | + # compatible library as part of its environment). |
| 58 | + maybe( |
| 59 | + http_archive, |
| 60 | + name = "com_github_libunwind", |
| 61 | + url = "https://github.com/libunwind/libunwind/releases/download/v1.6.2/libunwind-1.6.2.tar.gz", |
| 62 | + build_file_content = _ALL_CONTENT, |
| 63 | + sha256 = "4a6aec666991fb45d0889c44aede8ad6eb108071c3554fcdff671f9c94794976", |
| 64 | + strip_prefix = "libunwind-1.6.2", |
| 65 | + ) |
| 66 | + |
26 | 67 | maybe(
|
27 | 68 | new_git_repository,
|
28 |
| - name = "com_github_3rdparty_bazel_rules_backward_cpp_stacktrace", |
29 |
| - remote = "https://github.com/3rdparty/bazel-rules-backward-cpp", |
30 |
| - build_file = "@com_github_3rdparty_bazel_rules_backward_cpp//:BUILD.backward-stacktrace.bazel", |
31 |
| - commit = "69449957a41619e9b8b8be2e9bfaca2ac0642760", |
32 |
| - shallow_since = "1658132015 +0300", |
| 69 | + name = "com_github_lzma", |
| 70 | + remote = "https://github.com/kobolabs/liblzma.git", |
| 71 | + build_file_content = _ALL_CONTENT, |
| 72 | + commit = "87b7682ce4b1c849504e2b3641cebaad62aaef87", |
| 73 | + shallow_since = "1385587354 -0500", |
33 | 74 | )
|
34 | 75 |
|
| 76 | + # Get the latest gtest version. |
35 | 77 | maybe(
|
36 | 78 | http_archive,
|
37 |
| - name = "rules_foreign_cc", |
38 |
| - url = "https://github.com/bazelbuild/rules_foreign_cc/archive/refs/tags/0.9.0.tar.gz", |
39 |
| - sha256 = "2a4d07cd64b0719b39a7c12218a3e507672b82a97b98c6a89d38565894cf7c51", |
40 |
| - strip_prefix = "rules_foreign_cc-0.9.0", |
| 79 | + name = "com_github_google_googletest", |
| 80 | + url = "https://github.com/google/googletest/archive/refs/tags/release-1.12.1.tar.gz", |
| 81 | + sha256 = "81964fe578e9bd7c94dfdb09c8e4d6e6759e19967e397dbea48d1c10e45d0df2", |
| 82 | + strip_prefix = "googletest-release-1.12.1", |
| 83 | + repo_mapping = repo_mapping, |
| 84 | + ) |
| 85 | + |
| 86 | + maybe( |
| 87 | + http_archive, |
| 88 | + name = "com_github_backward_cpp", |
| 89 | + url = "https://github.com/bombela/backward-cpp/archive/refs/tags/v1.6.tar.gz", |
| 90 | + sha256 = "c654d0923d43f1cea23d086729673498e4741fb2457e806cfaeaea7b20c97c10", |
| 91 | + strip_prefix = "backward-cpp-1.6", |
41 | 92 | repo_mapping = repo_mapping,
|
| 93 | + patch_args = ["-p1"], |
| 94 | + patches = [workspace_prefix + "//:backward_cpp.patch"], |
42 | 95 | )
|
0 commit comments