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 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177
|
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
#
# MAINTAINER
#
# This file is used for the Bazel build.
#
# When changing (add, upgrade, remove) dependencies
# please update:
# - the CMake build, see file
# <root>/third_party_release
# - git submodule, see command
# git submodule status
#
def opentelemetry_cpp_deps():
"""Loads dependencies need to compile the opentelemetry-cpp library."""
# Google Benchmark library.
# Only needed for benchmarks, not to build the OpenTelemetry library.
maybe(
http_archive,
name = "com_github_google_benchmark",
sha256 = "6bc180a57d23d4d9515519f92b0c83d61b05b5bab188961f36ac7b06b0d9e9ce",
strip_prefix = "benchmark-1.8.3",
urls = [
"https://github.com/google/benchmark/archive/v1.8.3.tar.gz",
],
)
# GoogleTest framework.
# Only needed for tests, not to build the OpenTelemetry library.
maybe(
http_archive,
name = "com_google_googletest",
sha256 = "8ad598c73ad796e0d8280b082cebd82a630d73e73cd3c70057938a6501bba5d7",
strip_prefix = "googletest-1.14.0",
urls = [
"https://github.com/google/googletest/archive/v1.14.0.tar.gz",
],
)
# Load abseil dependency(optional)
maybe(
http_archive,
name = "com_google_absl",
sha256 = "733726b8c3a6d39a4120d7e45ea8b41a434cdacde401cba500f14236c49b39dc",
strip_prefix = "abseil-cpp-20240116.2",
urls = [
"https://github.com/abseil/abseil-cpp/archive/refs/tags/20240116.2.tar.gz",
],
)
# gRPC transitively depends on apple_support and rules_apple at older
# versions. Bazel 7.x requires newer versions of these rules. By loading
# them before grpc, these newer versions are preferrred.
maybe(
http_archive,
name = "build_bazel_apple_support",
sha256 = "c4bb2b7367c484382300aee75be598b92f847896fb31bbd22f3a2346adf66a80",
url = "https://github.com/bazelbuild/apple_support/releases/download/1.15.1/apple_support.1.15.1.tar.gz",
)
maybe(
http_archive,
name = "build_bazel_rules_apple",
sha256 = "b4df908ec14868369021182ab191dbd1f40830c9b300650d5dc389e0b9266c8d",
url = "https://github.com/bazelbuild/rules_apple/releases/download/3.5.1/rules_apple.3.5.1.tar.gz",
)
# Load gRPC dependency
maybe(
http_archive,
name = "com_github_grpc_grpc",
sha256 = "f40bde4ce2f31760f65dc49a2f50876f59077026494e67dccf23992548b1b04f",
strip_prefix = "grpc-1.62.0",
urls = [
"https://github.com/grpc/grpc/archive/refs/tags/v1.62.0.tar.gz",
],
)
# OTLP Protocol definition
maybe(
http_archive,
name = "com_github_opentelemetry_proto",
build_file = "@io_opentelemetry_cpp//bazel:opentelemetry_proto.BUILD",
sha256 = "11330d850f5e24d34c4246bc8cb21fcd311e7565d219195713455a576bb11bed",
strip_prefix = "opentelemetry-proto-1.7.0",
urls = [
"https://github.com/open-telemetry/opentelemetry-proto/archive/v1.7.0.tar.gz",
],
)
# JSON library
maybe(
http_archive,
name = "github_nlohmann_json",
build_file = "@io_opentelemetry_cpp//bazel:nlohmann_json.BUILD",
sha256 = "b8cb0ef2dd7f57f18933997c9934bb1fa962594f701cd5a8d3c2c80541559372",
urls = [
"https://github.com/nlohmann/json/releases/download/v3.12.0/include.zip",
],
)
# C++ Prometheus Client library.
maybe(
http_archive,
name = "com_github_jupp0r_prometheus_cpp",
sha256 = "ac6e958405a29fbbea9db70b00fa3c420e16ad32e1baf941ab233ba031dd72ee",
strip_prefix = "prometheus-cpp-1.3.0",
urls = [
"https://github.com/jupp0r/prometheus-cpp/archive/refs/tags/v1.3.0.tar.gz",
],
)
# bazel platforms
maybe(
http_archive,
name = "platforms",
sha256 = "218efe8ee736d26a3572663b374a253c012b716d8af0c07e842e82f238a0a7ee",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.10/platforms-0.0.10.tar.gz",
"https://github.com/bazelbuild/platforms/releases/download/0.0.10/platforms-0.0.10.tar.gz",
],
)
# libcurl (optional)
maybe(
http_archive,
name = "curl",
build_file = "@io_opentelemetry_cpp//bazel:curl.BUILD",
sha256 = "816e41809c043ff285e8c0f06a75a1fa250211bbfb2dc0a037eeef39f1a9e427",
strip_prefix = "curl-8.4.0",
urls = [
"https://curl.haxx.se/download/curl-8.4.0.tar.gz",
"https://github.com/curl/curl/releases/download/curl-8_4_0/curl-8.4.0.tar.gz",
],
)
# bazel skylib
maybe(
http_archive,
name = "bazel_skylib",
sha256 = "c6966ec828da198c5d9adbaa94c05e3a1c7f21bd012a0b29ba8ddbccb2c93b0d",
urls = [
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
],
)
# Opentracing
maybe(
http_archive,
name = "com_github_opentracing",
sha256 = "5b170042da4d1c4c231df6594da120875429d5231e9baa5179822ee8d1054ac3",
strip_prefix = "opentracing-cpp-1.6.0",
urls = [
"https://github.com/opentracing/opentracing-cpp/archive/refs/tags/v1.6.0.tar.gz",
],
)
# Zlib (optional)
maybe(
http_archive,
name = "zlib",
build_file = "@io_opentelemetry_cpp//bazel:zlib.BUILD",
sha256 = "d14c38e313afc35a9a8760dadf26042f51ea0f5d154b0630a31da0540107fb98",
strip_prefix = "zlib-1.2.13",
urls = [
"https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.xz",
"https://zlib.net/zlib-1.2.13.tar.xz",
],
)
|