File: MODULE.bazel

package info (click to toggle)
cpptrace 1.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,996 kB
  • sloc: cpp: 15,646; python: 962; ansic: 155; sh: 103; makefile: 86
file content (104 lines) | stat: -rw-r--r-- 2,742 bytes parent folder | download
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
module(
    name = "cpptrace",
)

bazel_dep(name = "googletest", version = "1.14.0")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_foreign_cc", version = "0.11.1")
bazel_dep(name = "zstd", version = "1.5.6")
bazel_dep(name = "zlib", version = "1.3.1")
bazel_dep(name = "xz", version = "5.4.5.bcr.2")
bazel_dep(name = "toolchains_llvm", version = "1.1.2")

# Configure and register the toolchain.
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm", dev_dependency = True)

llvm.toolchain(
    llvm_versions = {
        "": "18.1.8",
    },
    sha256 = {
        "": "54ec30358afcc9fb8aa74307db3046f5187f9fb89fb37064cdde906e062ebf36",
    },
    strip_prefix = {
        "": "clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04",
    },
    urls = {
        "": ["https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04.tar.xz"],
    },
)

use_repo(llvm, "llvm_toolchain")

register_toolchains("@llvm_toolchain//:all", dev_dependency = True)

http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "libdwarf",
    build_file_content =
        """
package(default_visibility = ["//visibility:public"])
load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")

filegroup(
    name = "sources",
    srcs = glob(["**/*"]),
)
cmake(
    name = "libdwarf",
    build_args = ["-j12"],
    lib_source = ":sources",
    out_static_libs =  ["libdwarf.a"],
    copts = ["-Wall", "-Werror"],
    deps = [
        "@zstd",
        "@zlib"
    ]
)
""",
    sha256 = "4ab8ae7b4b7aa42453725054b348f4fdb2460d5ba644199a1305311c718ff416",
    strip_prefix = "libdwarf-code-0.10.1",
    url = "https://github.com/davea42/libdwarf-code/archive/refs/tags/v0.10.1.tar.gz",
)



http_archive(
    name = "libunwind",
    build_file_content =
        """
package(default_visibility = ["//visibility:public"])
load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make")

filegroup(
    name = "sources",
    srcs = glob(["**/*"]),
)
configure_make(
    name = "libunwind",
    args = ["-j12"],
    autoreconf = True,
    configure_in_place = True,
    autoreconf_options = [
        "-i",
    ],
    lib_source = ":sources",
    out_static_libs =  [
        "libunwind.a",
        "libunwind-coredump.a",
        "libunwind-ptrace.a",
        "libunwind-x86_64.a",
        "libunwind-generic.a",
        "libunwind-setjmp.a"
    ],
    deps = [
        "@xz//:lzma"
    ]
)
""",
    sha256 = "38833b7b1582db7d76485a62a213706c9252b3dab7380069fea5824e823d8e41",
    strip_prefix = "libunwind-1.8.1",
    url = "https://github.com/libunwind/libunwind/archive/refs/tags/v1.8.1.tar.gz",
)