diff --git a/api/BUILD b/api/BUILD index fa4da45a66..2eca1de986 100644 --- a/api/BUILD +++ b/api/BUILD @@ -1,15 +1,10 @@ # Copyright The OpenTelemetry Authors # SPDX-License-Identifier: Apache-2.0 -load("@bazel_skylib//rules:common_settings.bzl", "bool_flag", "string_flag") +load("@bazel_skylib//rules:common_settings.bzl", "string_flag") package(default_visibility = ["//visibility:public"]) -bool_flag( - name = "with_abseil", - build_setting_default = False, -) - CPP_STDLIBS = [ "none", "best", @@ -28,10 +23,7 @@ string_flag( cc_library( name = "api", hdrs = glob(["include/**/*.h"]), - defines = select({ - ":with_external_abseil": ["HAVE_ABSEIL"], - "//conditions:default": [], - }) + select({ + defines = ["HAVE_ABSEIL"] + select({ ":set_cxx_stdlib_none": [], ### automatic selection ":set_cxx_stdlib_best": ["OPENTELEMETRY_STL_VERSION=(__cplusplus/100)"], @@ -46,19 +38,11 @@ cc_library( }), strip_include_prefix = "include", tags = ["api"], - deps = select({ - ":with_external_abseil": [ - "@com_google_absl//absl/base", - "@com_google_absl//absl/strings", - "@com_google_absl//absl/types:variant", - ], - "//conditions:default": [], - }), -) - -config_setting( - name = "with_external_abseil", - flag_values = {":with_abseil": "true"}, + deps = [ + "@com_google_absl//absl/base", + "@com_google_absl//absl/strings", + "@com_google_absl//absl/types:variant", + ], ) [config_setting( diff --git a/bazel/repository.bzl b/bazel/repository.bzl index 5e825d2b46..606283468d 100644 --- a/bazel/repository.bzl +++ b/bazel/repository.bzl @@ -55,19 +55,12 @@ def opentelemetry_cpp_deps(): # Load abseil dependency(optional) maybe( - # - # Important note: - # - # The bazel build still uses abseil-cpp-20220623.1 here. - # - # Upgrading to abseil-cpp-20240116.1 breaks the OTLP build, reason unknown. - # http_archive, name = "com_google_absl", - sha256 = "91ac87d30cc6d79f9ab974c51874a704de9c2647c40f6932597329a282217ba8", - strip_prefix = "abseil-cpp-20220623.1", + sha256 = "3c743204df78366ad2eaf236d6631d83f6bc928d1705dd0000b872e53b73dc6a", + strip_prefix = "abseil-cpp-20240116.1", urls = [ - "https://github.com/abseil/abseil-cpp/archive/refs/tags/20220623.1.tar.gz", + "https://github.com/abseil/abseil-cpp/archive/refs/tags/20240116.1.tar.gz", ], )