|
@@ -54,9 +54,9 @@ cc_library(
|
|
"src/google/protobuf/stubs/time.cc",
|
|
"src/google/protobuf/stubs/time.cc",
|
|
"src/google/protobuf/wire_format_lite.cc",
|
|
"src/google/protobuf/wire_format_lite.cc",
|
|
],
|
|
],
|
|
|
|
+ hdrs = glob(["src/google/protobuf/**/*.h"]),
|
|
copts = COPTS,
|
|
copts = COPTS,
|
|
includes = ["src/"],
|
|
includes = ["src/"],
|
|
- hdrs = glob(["src/google/protobuf/**/*.h"]),
|
|
|
|
linkopts = LINK_OPTS,
|
|
linkopts = LINK_OPTS,
|
|
visibility = ["//visibility:public"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
)
|
|
@@ -156,9 +156,9 @@ cc_proto_library(
|
|
name = "cc_wkt_protos",
|
|
name = "cc_wkt_protos",
|
|
srcs = WELL_KNOWN_PROTOS,
|
|
srcs = WELL_KNOWN_PROTOS,
|
|
include = "src",
|
|
include = "src",
|
|
|
|
+ default_runtime = ":protobuf",
|
|
internal_bootstrap_hack = 1,
|
|
internal_bootstrap_hack = 1,
|
|
protoc = ":protoc",
|
|
protoc = ":protoc",
|
|
- default_runtime = ":protobuf",
|
|
|
|
visibility = ["//visibility:public"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
)
|
|
|
|
|
|
@@ -336,8 +336,8 @@ cc_proto_library(
|
|
name = "cc_test_protos",
|
|
name = "cc_test_protos",
|
|
srcs = LITE_TEST_PROTOS + TEST_PROTOS,
|
|
srcs = LITE_TEST_PROTOS + TEST_PROTOS,
|
|
include = "src",
|
|
include = "src",
|
|
- protoc = ":protoc",
|
|
|
|
default_runtime = ":protobuf",
|
|
default_runtime = ":protobuf",
|
|
|
|
+ protoc = ":protoc",
|
|
deps = [":cc_wkt_protos"],
|
|
deps = [":cc_wkt_protos"],
|
|
)
|
|
)
|
|
|
|
|
|
@@ -509,15 +509,66 @@ internal_copied_filegroup(
|
|
include = "python",
|
|
include = "python",
|
|
)
|
|
)
|
|
|
|
|
|
|
|
+cc_binary(
|
|
|
|
+ name = "internal/_api_implementation.so",
|
|
|
|
+ srcs = ["python/google/protobuf/internal/api_implementation.cc"],
|
|
|
|
+ copts = COPTS + [
|
|
|
|
+ "-DPYTHON_PROTO2_CPP_IMPL_V2",
|
|
|
|
+ ],
|
|
|
|
+ linkshared = 1,
|
|
|
|
+ linkstatic = 1,
|
|
|
|
+ deps = select({
|
|
|
|
+ "//conditions:default": [],
|
|
|
|
+ ":use_fast_cpp_protos": ["//util/python:python_headers"],
|
|
|
|
+ }),
|
|
|
|
+)
|
|
|
|
+
|
|
|
|
+cc_binary(
|
|
|
|
+ name = "pyext/_message.so",
|
|
|
|
+ srcs = glob([
|
|
|
|
+ "python/google/protobuf/pyext/*.cc",
|
|
|
|
+ "python/google/protobuf/pyext/*.h",
|
|
|
|
+ ]),
|
|
|
|
+ copts = COPTS + [
|
|
|
|
+ "-DGOOGLE_PROTOBUF_HAS_ONEOF=1",
|
|
|
|
+ ],
|
|
|
|
+ includes = [
|
|
|
|
+ "python/",
|
|
|
|
+ "src/",
|
|
|
|
+ ],
|
|
|
|
+ linkshared = 1,
|
|
|
|
+ linkstatic = 1,
|
|
|
|
+ deps = [
|
|
|
|
+ ":protobuf",
|
|
|
|
+ ] + select({
|
|
|
|
+ "//conditions:default": [],
|
|
|
|
+ ":use_fast_cpp_protos": ["//util/python:python_headers"],
|
|
|
|
+ }),
|
|
|
|
+)
|
|
|
|
+
|
|
|
|
+config_setting(
|
|
|
|
+ name = "use_fast_cpp_protos",
|
|
|
|
+ values = {
|
|
|
|
+ "define": "use_fast_cpp_protos=true",
|
|
|
|
+ },
|
|
|
|
+)
|
|
|
|
+
|
|
py_proto_library(
|
|
py_proto_library(
|
|
name = "protobuf_python",
|
|
name = "protobuf_python",
|
|
srcs = WELL_KNOWN_PROTOS,
|
|
srcs = WELL_KNOWN_PROTOS,
|
|
- srcs_version = "PY2AND3",
|
|
|
|
include = "src",
|
|
include = "src",
|
|
|
|
+ data = select({
|
|
|
|
+ "//conditions:default": [],
|
|
|
|
+ ":use_fast_cpp_protos": [
|
|
|
|
+ ":internal/_api_implementation.so",
|
|
|
|
+ ":pyext/_message.so",
|
|
|
|
+ ],
|
|
|
|
+ }),
|
|
|
|
+ default_runtime = "",
|
|
protoc = ":protoc",
|
|
protoc = ":protoc",
|
|
py_extra_srcs = [":python_srcs"],
|
|
py_extra_srcs = [":python_srcs"],
|
|
py_libs = ["//external:six"],
|
|
py_libs = ["//external:six"],
|
|
- default_runtime = "",
|
|
|
|
|
|
+ srcs_version = "PY2AND3",
|
|
visibility = ["//visibility:public"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
)
|
|
|
|
|
|
@@ -536,9 +587,9 @@ py_proto_library(
|
|
name = "python_common_test_protos",
|
|
name = "python_common_test_protos",
|
|
srcs = LITE_TEST_PROTOS + TEST_PROTOS,
|
|
srcs = LITE_TEST_PROTOS + TEST_PROTOS,
|
|
include = "src",
|
|
include = "src",
|
|
|
|
+ default_runtime = "",
|
|
protoc = ":protoc",
|
|
protoc = ":protoc",
|
|
deps = [":protobuf_python"],
|
|
deps = [":protobuf_python"],
|
|
- default_runtime = "",
|
|
|
|
)
|
|
)
|
|
|
|
|
|
py_proto_library(
|
|
py_proto_library(
|
|
@@ -548,9 +599,9 @@ py_proto_library(
|
|
"python/google/protobuf/internal/import_test_package/*.proto",
|
|
"python/google/protobuf/internal/import_test_package/*.proto",
|
|
]),
|
|
]),
|
|
include = "python",
|
|
include = "python",
|
|
|
|
+ default_runtime = ":protobuf_python",
|
|
protoc = ":protoc",
|
|
protoc = ":protoc",
|
|
deps = [":python_common_test_protos"],
|
|
deps = [":python_common_test_protos"],
|
|
- default_runtime = ":protobuf_python",
|
|
|
|
)
|
|
)
|
|
|
|
|
|
py_library(
|
|
py_library(
|