Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: third_party/protobuf/proto_library.gni

Issue 2448133006: Tool added to extract network traffic annotations. (Closed)
Patch Set: minor bug fixed. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/protobuf/BUILD.gn ('k') | tools/clang/scripts/generate_win_compdb.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/protobuf/proto_library.gni
diff --git a/third_party/protobuf/proto_library.gni b/third_party/protobuf/proto_library.gni
index 723a15290d9dda4a97d721f7751b1782ed87e9b8..7c74e4ef8e422b7ce8d29a5d668c2d44c46a23d7 100644
--- a/third_party/protobuf/proto_library.gni
+++ b/third_party/protobuf/proto_library.gni
@@ -59,6 +59,10 @@
# deps (optional)
# Additional dependencies.
#
+# use_protobuf_full (optional)
+# If adding protobuf library would be required, adds protobuf_full to deps
+# instead of protobuf_lite.
Peter Kasting 2016/11/26 05:44:17 Nit: Maybe clearer: Adds protobuf_full to the dep
+#
# Parameters for compiling the generated code:
#
# component_build_force_source_set (Default=false)
@@ -117,9 +121,9 @@ template("proto_library") {
# also Windows executables have .exe at the end.
plugin_host_label = invoker.generator_plugin_label + "($host_toolchain)"
- plugin_path = get_label_info(plugin_host_label, "root_out_dir") + "/" +
- get_label_info(plugin_host_label, "name") +
- host_executable_suffix
+ plugin_path =
+ get_label_info(plugin_host_label, "root_out_dir") + "/" +
+ get_label_info(plugin_host_label, "name") + host_executable_suffix
generate_with_plugin = true
} else if (defined(invoker.generator_plugin_script)) {
plugin_path = invoker.generator_plugin_script
@@ -301,8 +305,7 @@ template("proto_library") {
# Option to disable building a library in component build.
if (defined(invoker.component_build_force_source_set) &&
- invoker.component_build_force_source_set &&
- is_component_build) {
+ invoker.component_build_force_source_set && is_component_build) {
link_target_type = "source_set"
} else {
link_target_type = "static_library"
@@ -348,9 +351,16 @@ template("proto_library") {
# within protobuf_lite. Hence, dependencies require those headers too.
# If using generator plugin, extra deps should be resolved by the invoker.
if (generate_cc) {
- public_deps = [
- "//third_party/protobuf:protobuf_lite",
- ]
+ if (defined(invoker.use_protobuf_full) &&
+ invoker.use_protobuf_full == true) {
+ public_deps = [
+ "//third_party/protobuf:protobuf_full",
+ ]
+ } else {
+ public_deps = [
+ "//third_party/protobuf:protobuf_lite",
+ ]
+ }
}
}
« no previous file with comments | « third_party/protobuf/BUILD.gn ('k') | tools/clang/scripts/generate_win_compdb.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698