Added a header only cc_library target for the protobuf library.
This commit is contained in:
parent
17174b54dd
commit
2d430f8c72
26
BUILD
26
BUILD
@ -181,6 +181,13 @@ cc_library(
|
|||||||
deps = [":protobuf_lite"],
|
deps = [":protobuf_lite"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
cc_library(
|
||||||
|
name = "protobuf_headers",
|
||||||
|
hdrs = glob(["src/**/*.h"]),
|
||||||
|
includes = ["src/"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
objc_library(
|
objc_library(
|
||||||
name = "protobuf_objc",
|
name = "protobuf_objc",
|
||||||
hdrs = ["objectivec/GPBProtocolBuffers.h"],
|
hdrs = ["objectivec/GPBProtocolBuffers.h"],
|
||||||
@ -565,12 +572,12 @@ java_library(
|
|||||||
srcs = glob([
|
srcs = glob([
|
||||||
"java/util/src/main/java/com/google/protobuf/util/*.java",
|
"java/util/src/main/java/com/google/protobuf/util/*.java",
|
||||||
]),
|
]),
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
deps = [
|
deps = [
|
||||||
"protobuf_java",
|
"protobuf_java",
|
||||||
"//external:gson",
|
"//external:gson",
|
||||||
"//external:guava",
|
"//external:guava",
|
||||||
],
|
],
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -591,8 +598,8 @@ py_library(
|
|||||||
"python/google/protobuf/internal/test_util.py",
|
"python/google/protobuf/internal/test_util.py",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
srcs_version = "PY2AND3",
|
|
||||||
imports = ["python"],
|
imports = ["python"],
|
||||||
|
srcs_version = "PY2AND3",
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_binary(
|
cc_binary(
|
||||||
@ -657,8 +664,8 @@ config_setting(
|
|||||||
internal_copied_filegroup(
|
internal_copied_filegroup(
|
||||||
name = "protos_python",
|
name = "protos_python",
|
||||||
srcs = WELL_KNOWN_PROTOS,
|
srcs = WELL_KNOWN_PROTOS,
|
||||||
strip_prefix = "src",
|
|
||||||
dest = "python",
|
dest = "python",
|
||||||
|
strip_prefix = "src",
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO(dzc): Remove this once py_proto_library can have labels in srcs, in
|
# TODO(dzc): Remove this once py_proto_library can have labels in srcs, in
|
||||||
@ -680,7 +687,7 @@ py_proto_library(
|
|||||||
protoc = ":protoc",
|
protoc = ":protoc",
|
||||||
py_libs = [
|
py_libs = [
|
||||||
":python_srcs",
|
":python_srcs",
|
||||||
"//external:six"
|
"//external:six",
|
||||||
],
|
],
|
||||||
srcs_version = "PY2AND3",
|
srcs_version = "PY2AND3",
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
@ -694,13 +701,14 @@ py_proto_library(
|
|||||||
internal_copied_filegroup(
|
internal_copied_filegroup(
|
||||||
name = "protos_python_test",
|
name = "protos_python_test",
|
||||||
srcs = LITE_TEST_PROTOS + TEST_PROTOS,
|
srcs = LITE_TEST_PROTOS + TEST_PROTOS,
|
||||||
strip_prefix = "src",
|
|
||||||
dest = "python",
|
dest = "python",
|
||||||
|
strip_prefix = "src",
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO(dzc): Remove this once py_proto_library can have labels in srcs, in
|
# TODO(dzc): Remove this once py_proto_library can have labels in srcs, in
|
||||||
# which case we can simply add :protos_python_test in srcs.
|
# which case we can simply add :protos_python_test in srcs.
|
||||||
COPIED_LITE_TEST_PROTOS = ["python/" + s for s in RELATIVE_LITE_TEST_PROTOS]
|
COPIED_LITE_TEST_PROTOS = ["python/" + s for s in RELATIVE_LITE_TEST_PROTOS]
|
||||||
|
|
||||||
COPIED_TEST_PROTOS = ["python/" + s for s in RELATIVE_TEST_PROTOS]
|
COPIED_TEST_PROTOS = ["python/" + s for s in RELATIVE_TEST_PROTOS]
|
||||||
|
|
||||||
py_proto_library(
|
py_proto_library(
|
||||||
@ -770,10 +778,10 @@ internal_protobuf_py_tests(
|
|||||||
)
|
)
|
||||||
|
|
||||||
proto_lang_toolchain(
|
proto_lang_toolchain(
|
||||||
name = "cc_toolchain",
|
name = "cc_toolchain",
|
||||||
command_line = "--cpp_out=$(OUT)",
|
command_line = "--cpp_out=$(OUT)",
|
||||||
runtime = ":protobuf",
|
runtime = ":protobuf",
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
)
|
)
|
||||||
|
|
||||||
proto_lang_toolchain(
|
proto_lang_toolchain(
|
||||||
|
Loading…
Reference in New Issue
Block a user