# Copyright 2022 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import("//third_party/abseil-cpp/absl.gni") absl_source_set("check_op") { sources = [ "check_op.cc" ] public = [ "check_op.h" ] deps = [ ":nullguard", ":nullstream", ":strip", "//third_party/abseil-cpp/absl/base:config", "//third_party/abseil-cpp/absl/base:core_headers", "//third_party/abseil-cpp/absl/strings", ] } absl_source_set("conditions") { sources = [ "conditions.cc" ] public = [ "conditions.h" ] deps = [ ":voidify", "//third_party/abseil-cpp/absl/base", "//third_party/abseil-cpp/absl/base:config", "//third_party/abseil-cpp/absl/base:core_headers", ] } absl_source_set("config") { public = [ "config.h" ] deps = [ "//third_party/abseil-cpp/absl/base:config", "//third_party/abseil-cpp/absl/base:core_headers", ] } absl_source_set("flags") { public = [ "flags.h" ] deps = [ "//third_party/abseil-cpp/absl/flags:flag" ] } absl_source_set("format") { sources = [ "log_format.cc" ] public = [ "log_format.h" ] deps = [ ":config", ":globals", "//third_party/abseil-cpp/absl/base:config", "//third_party/abseil-cpp/absl/base:core_headers", "//third_party/abseil-cpp/absl/base:log_severity", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/strings:str_format", "//third_party/abseil-cpp/absl/time", "//third_party/abseil-cpp/absl/types:span", ] } absl_source_set("globals") { sources = [ "globals.cc" ] public = [ "globals.h" ] deps = [ "//third_party/abseil-cpp/absl/base:config", "//third_party/abseil-cpp/absl/base:core_headers", "//third_party/abseil-cpp/absl/base:log_severity", "//third_party/abseil-cpp/absl/base:raw_logging_internal", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/time", ] } absl_source_set("log_message") { sources = [ "log_message.cc" ] public = [ "log_message.h" ] deps = [ ":config", ":format", ":globals", ":log_sink_set", ":nullguard", "//third_party/abseil-cpp/absl/base", "//third_party/abseil-cpp/absl/base:config", "//third_party/abseil-cpp/absl/base:core_headers", "//third_party/abseil-cpp/absl/base:errno_saver", "//third_party/abseil-cpp/absl/base:log_severity", "//third_party/abseil-cpp/absl/base:raw_logging_internal", "//third_party/abseil-cpp/absl/base:strerror", "//third_party/abseil-cpp/absl/container:inlined_vector", "//third_party/abseil-cpp/absl/debugging:examine_stack", "//third_party/abseil-cpp/absl/log:globals", "//third_party/abseil-cpp/absl/log:log_entry", "//third_party/abseil-cpp/absl/log:log_sink", "//third_party/abseil-cpp/absl/log:log_sink_registry", "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/strings:str_format", "//third_party/abseil-cpp/absl/time", "//third_party/abseil-cpp/absl/types:span", ] # TODO(crbug.com/1382143): Needed for log_message.cc using ATOMIC_FLAG_INIT which is marked as deprecated. # Remove when absl moves away from ATOMIC_FLAG_INIT (when the bug below is unblocked) if (is_clang) { cflags_cc = [ "-Wno-deprecated" ] } } absl_source_set("log_sink_set") { sources = [ "log_sink_set.cc" ] public = [ "log_sink_set.h" ] deps = [ ":config", ":globals", "//third_party/abseil-cpp/absl/base", "//third_party/abseil-cpp/absl/base:config", "//third_party/abseil-cpp/absl/base:core_headers", "//third_party/abseil-cpp/absl/base:log_severity", "//third_party/abseil-cpp/absl/base:raw_logging_internal", "//third_party/abseil-cpp/absl/cleanup", "//third_party/abseil-cpp/absl/log:globals", "//third_party/abseil-cpp/absl/log:log_entry", "//third_party/abseil-cpp/absl/log:log_sink", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/synchronization", "//third_party/abseil-cpp/absl/types:span", ] if (is_android) { libs = [ "log" ] } } absl_source_set("nullguard") { public = [ "nullguard.h" ] deps = [ "//third_party/abseil-cpp/absl/base:config" ] } absl_source_set("nullstream") { public = [ "nullstream.h" ] deps = [ "//third_party/abseil-cpp/absl/base:config", "//third_party/abseil-cpp/absl/base:core_headers", "//third_party/abseil-cpp/absl/base:log_severity", "//third_party/abseil-cpp/absl/strings", ] } absl_source_set("strip") { public = [ "strip.h" ] deps = [ ":log_message", ":nullstream", "//third_party/abseil-cpp/absl/base:log_severity", ] } absl_source_set("test_actions") { testonly = true sources = [ "test_actions.cc" ] public = [ "test_actions.h" ] deps = [ ":config", "//third_party/abseil-cpp/absl/base:config", "//third_party/abseil-cpp/absl/base:log_severity", "//third_party/abseil-cpp/absl/log:log_entry", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/time", ] } absl_source_set("test_helpers") { testonly = true sources = [ "test_helpers.cc" ] public = [ "test_helpers.h" ] deps = [ ":globals", "//third_party/abseil-cpp/absl/base:config", "//third_party/abseil-cpp/absl/base:log_severity", "//third_party/abseil-cpp/absl/log:globals", "//third_party/abseil-cpp/absl/log:initialize", "//third_party/googletest:gtest", ] } absl_source_set("test_matchers") { testonly = true sources = [ "test_matchers.cc" ] public = [ "test_matchers.h" ] deps = [ ":config", ":test_helpers", "//third_party/abseil-cpp/absl/base:config", "//third_party/abseil-cpp/absl/base:log_severity", "//third_party/abseil-cpp/absl/log:log_entry", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/time", "//third_party/googletest:gmock", "//third_party/googletest:gtest", ] } absl_source_set("voidify") { public = [ "voidify.h" ] deps = [ "//third_party/abseil-cpp/absl/base:config" ] } absl_test("stderr_log_sink_test") { sources = [ "stderr_log_sink_test.cc" ] if (is_apple || is_android) { sources = [] } deps = [ ":test_helpers", "//third_party/abseil-cpp/absl/base:core_headers", "//third_party/abseil-cpp/absl/base:log_severity", "//third_party/abseil-cpp/absl/log", "//third_party/abseil-cpp/absl/log:globals", ] }