• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2009-2021, Google LLC
2# All rights reserved.
3#
4# Use of this source code is governed by a BSD-style
5# license that can be found in the LICENSE file or at
6# https://developers.google.com/open-source/licenses/bsd
7
8load("//upb/bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
9
10package(default_applicable_licenses = ["//:license"])
11
12cc_library(
13    name = "port",
14    hdrs = [
15        "atomic.h",
16        "vsnprintf_compat.h",
17    ],
18    copts = UPB_DEFAULT_COPTS,
19    textual_hdrs = [
20        # We must list the headers explicitly here instead of relying on the
21        # :inc filegroup below. gRPC auto-generates various build configs from
22        # the Bazel graph, and this logic does not know how to handle
23        # filegroups. We might be able to replace these headers with just
24        # ":inc" after gRPC starts using upb's CMake build.
25        "def.inc",
26        "undef.inc",
27    ],
28    visibility = ["//visibility:public"],
29)
30
31filegroup(
32    name = "inc",
33    srcs = [
34        "def.inc",
35        "undef.inc",
36    ],
37    visibility = ["//visibility:public"],
38)
39
40filegroup(
41    name = "source_files",
42    srcs = glob(
43        [
44            "**/*.h",
45            "**/*.inc",
46        ],
47    ),
48    visibility = [
49        "//python/dist:__pkg__",
50        "//upb/cmake:__pkg__",
51    ],
52)
53