upb: create upb/port/BUILD

PiperOrigin-RevId: 557506561
pull/13675/head^2
Eric Salo 1 year ago committed by Copybara-Service
parent cd176a0cd1
commit f4ca34807e
  1. 34
      BUILD
  2. 1
      cmake/BUILD.bazel
  3. 1
      python/dist/BUILD.bazel
  4. 63
      upb/port/BUILD

34
BUILD

@ -106,20 +106,6 @@ package_group(
# Public C/C++ libraries #######################################################
cc_library(
name = "port",
hdrs = [
"upb/port/atomic.h",
"upb/port/vsnprintf_compat.h",
],
copts = UPB_DEFAULT_COPTS,
textual_hdrs = [
"upb/port/def.inc",
"upb/port/undef.inc",
],
visibility = ["//:__subpackages__"],
)
cc_library(
name = "upb",
hdrs = [
@ -402,8 +388,7 @@ cc_library(
hdrs = ["upb/generated_code_support.h"],
copts = UPB_DEFAULT_COPTS,
textual_hdrs = [
"upb/port/def.inc",
"upb/port/undef.inc",
"//upb/port:inc",
],
visibility = ["//visibility:public"],
deps = [
@ -415,7 +400,6 @@ cc_library(
":message_internal",
":mini_descriptor",
":mini_table",
":upb",
":wire_internal",
],
)
@ -425,11 +409,12 @@ cc_library(
name = "generated_cpp_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me",
hdrs = [
"upb/message/message.h",
"upb/port/def.inc",
"upb/port/undef.inc",
"upb/upb.hpp",
],
copts = UPB_DEFAULT_COPTS,
textual_hdrs = [
"//upb/port:inc",
],
visibility = ["//visibility:public"],
deps = [
":base",
@ -446,12 +431,13 @@ cc_library(
cc_library(
name = "generated_reflection_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me",
hdrs = [
"upb/port/def.inc",
"upb/port/undef.inc",
"upb/reflection/def.h",
"upb/reflection/internal/def_pool.h",
],
copts = UPB_DEFAULT_COPTS,
textual_hdrs = [
"//upb/port:inc",
],
visibility = ["//visibility:public"],
deps = [
":mem",
@ -680,6 +666,12 @@ alias(
visibility = ["//:friends"],
)
alias(
name = "port",
actual = "//upb/port",
visibility = ["//visibility:public"],
)
alias(
name = "text",
actual = "//upb/text",

@ -111,6 +111,7 @@ sh_test(
"//upb/mem:source_files",
"//upb/mini_descriptor:source_files",
"//upb/mini_table:source_files",
"//upb/port:source_files",
"//upb/text:source_files",
"//upb/wire:source_files",
"@utf8_range//:utf8_range_srcs",

@ -261,6 +261,7 @@ pkg_files(
"//upb/mem:source_files",
"//upb/mini_descriptor:source_files",
"//upb/mini_table:source_files",
"//upb/port:source_files",
"//upb/text:source_files",
"//upb/util:source_files",
"//upb/wire:source_files",

@ -0,0 +1,63 @@
# Copyright (c) 2009-2021, Google LLC
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of Google LLC nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL Google LLC BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
load("//bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
cc_library(
name = "port",
hdrs = [
"atomic.h",
"vsnprintf_compat.h",
],
copts = UPB_DEFAULT_COPTS,
textual_hdrs = [":inc"],
visibility = ["//visibility:public"],
)
filegroup(
name = "inc",
srcs = [
"def.inc",
"undef.inc",
],
visibility = ["//visibility:public"],
)
# begin:github_only
filegroup(
name = "source_files",
srcs = glob(
[
"**/*.c",
"**/*.h",
"**/*.inc",
],
),
visibility = [
"//cmake:__pkg__",
"//python/dist:__pkg__",
]
)
# end:github_only
Loading…
Cancel
Save