Protocol Buffers - Google's data interchange format (grpc依赖) https://developers.google.com/protocol-buffers/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

76 lines
2.1 KiB

# Copyright (c) 2009-2021, Google LLC
# All rights reserved.
#
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load(
"//upb/bazel:build_defs.bzl",
"make_shell_script",
)
load(
":build_defs.bzl",
"staleness_test",
)
licenses(["notice"])
exports_files(["staleness_test.py"])
py_library(
name = "staleness_test_lib",
testonly = 1,
srcs = ["staleness_test_lib.py"],
# This is public only for use by the staleness_test() macro. Please do not
# depend on this target directly.
visibility = ["//visibility:public"],
)
genrule(
name = "copy_protos",
srcs = [
"//src/google/protobuf:descriptor_upb_c_proto",
"//src/google/protobuf:descriptor_upb_minitable_proto",
],
outs = [
"generated-in/google/protobuf/descriptor.upb.h",
"generated-in/google/protobuf/descriptor.upb_minitable.c",
"generated-in/google/protobuf/descriptor.upb_minitable.h",
],
cmd = "cp $(SRCS) $(@D)/generated-in/google/protobuf",
)
staleness_test(
name = "test_generated_files",
outs = [
"google/protobuf/descriptor.upb.h",
"google/protobuf/descriptor.upb_minitable.c",
"google/protobuf/descriptor.upb_minitable.h",
],
generated_pattern = "generated-in/%s",
tags = ["manual"],
)
pkg_files(
name = "upb_cmake_dist",
srcs = [
":copy_protos",
"//third_party/utf8_range:utf8_range_srcs",
"//upb:source_files",
"//upb/base:source_files",
"//upb/hash:source_files",
"//upb/lex:source_files",
"//upb/mem:source_files",
"//upb/message:source_files",
"//upb/mini_descriptor:source_files",
"//upb/mini_table:source_files",
"//upb/port:source_files",
"//upb/reflection:source_files",
"//upb/text:source_files",
"//upb/wire:source_files",
],
strip_prefix = strip_prefix.from_root(""),
visibility = ["//rust:__pkg__"],
)