-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Thirdparty] Upgrade protobuf to 3.9.2.
Signed-off-by: Tongxuan Liu <tongxuan.ltx@alibaba-inc.com>
- Loading branch information
1 parent
3bc930a
commit 9e65506
Showing
3 changed files
with
34 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,43 @@ | ||
diff --git a/BUILD b/BUILD | ||
index 2fb26050..c2744d5b 100644 | ||
index dbae719ff..87dc38470 100644 | ||
--- a/BUILD | ||
+++ b/BUILD | ||
@@ -19,7 +19,7 @@ config_setting( | ||
@@ -23,7 +23,7 @@ config_setting( | ||
# ZLIB configuration | ||
################################################################################ | ||
|
||
-ZLIB_DEPS = ["@zlib//:zlib"] | ||
+ZLIB_DEPS = ["@zlib_archive//:zlib"] | ||
+ZLIB_DEPS = ["@zlib"] | ||
|
||
################################################################################ | ||
# Protobuf Runtime Library | ||
@@ -209,6 +209,7 @@ cc_library( | ||
@@ -143,6 +143,7 @@ cc_library( | ||
copts = COPTS, | ||
includes = ["src/"], | ||
linkopts = LINK_OPTS, | ||
+ alwayslink = 1, | ||
visibility = ["//visibility:public"], | ||
deps = [":protobuf_lite"] + PROTOBUF_DEPS, | ||
) | ||
@@ -219,7 +220,7 @@ cc_library( | ||
# TODO(keveman): Remove this target once the support gets added to Bazel. | ||
cc_library( | ||
name = "protobuf_headers", | ||
- hdrs = glob(["src/**/*.h"]), | ||
+ hdrs = glob(["src/**/*.h", "src/**/*.inc"]), | ||
|
||
@@ -213,6 +214,7 @@ cc_library( | ||
copts = COPTS, | ||
includes = ["src/"], | ||
linkopts = LINK_OPTS, | ||
+ alwayslink = 1, | ||
visibility = ["//visibility:public"], | ||
deps = [":protobuf_lite"] + PROTOBUF_DEPS, | ||
) | ||
diff --git a/protobuf.bzl b/protobuf.bzl | ||
index e0653321f..253d9cbb5 100644 | ||
--- a/protobuf.bzl | ||
+++ b/protobuf.bzl | ||
@@ -84,7 +84,9 @@ def _proto_gen_impl(ctx): | ||
|
||
for dep in ctx.attr.deps: | ||
import_flags += dep.proto.import_flags | ||
deps += dep.proto.deps | ||
+ import_flags = depset(import_flags).to_list() | ||
+ deps = depset(deps).to_list() | ||
|
||
if not ctx.attr.gen_cc and not ctx.attr.gen_py and not ctx.executable.plugin: | ||
return struct( |