1# 2# Copyright 2017 The Abseil Authors. 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# https://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15 16# This package contains `absl::Status`. 17# It will expand later to have utilities around `Status` like `StatusOr`, 18# `StatusBuilder` and macros. 19 20load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test") 21load( 22 "//absl:copts/configure_copts.bzl", 23 "ABSL_DEFAULT_COPTS", 24 "ABSL_TEST_COPTS", 25) 26 27package(default_visibility = ["//visibility:public"]) 28 29licenses(["notice"]) # Apache 2.0 30 31cc_library( 32 name = "status", 33 srcs = [ 34 "status.cc", 35 "status_payload_printer.cc", 36 ], 37 hdrs = [ 38 "status.h", 39 "status_payload_printer.h", 40 ], 41 copts = ABSL_DEFAULT_COPTS, 42 deps = [ 43 "//absl/base:config", 44 "//absl/base:core_headers", 45 "//absl/base:raw_logging_internal", 46 "//absl/container:inlined_vector", 47 "//absl/debugging:stacktrace", 48 "//absl/debugging:symbolize", 49 "//absl/strings", 50 "//absl/strings:cord", 51 "//absl/strings:str_format", 52 "//absl/types:optional", 53 ], 54) 55 56cc_test( 57 name = "status_test", 58 srcs = ["status_test.cc"], 59 copts = ABSL_TEST_COPTS, 60 deps = [ 61 ":status", 62 "//absl/strings", 63 "@com_google_googletest//:gtest_main", 64 ], 65) 66