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

Unified Diff: components/tracing/proto_zero_plugin/BUILD.gn

Issue 2147613002: Skeleton for proto_zero_plugin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix cross compilation Created 4 years, 5 months 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
Index: components/tracing/proto_zero_plugin/BUILD.gn
diff --git a/components/tracing/proto_zero_plugin/BUILD.gn b/components/tracing/proto_zero_plugin/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..3e73cd93f83cb1dd31fa2bd759d4bb990d390f52
--- /dev/null
+++ b/components/tracing/proto_zero_plugin/BUILD.gn
@@ -0,0 +1,41 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//third_party/protobuf/proto_library.gni")
+
+if (current_toolchain == host_toolchain) {
+ executable("proto_zero_plugin") {
+ sources = [
+ "proto_zero_generator.cc",
+ "proto_zero_generator.h",
+ "proto_zero_plugin.cc",
+ ]
+ deps = [
+ "//third_party/protobuf:protoc_lib",
+ ]
+ }
+}
+
+# For unit tests.
+proto_library("mock_messages") {
Primiano Tucci (use gerrit) 2016/07/13 16:52:31 ditto about proto_zero_examples
+ visibility = [ "//components/tracing/*" ]
+
+ sources = [
+ "mock_messages.proto",
+ ]
+
+ plugin_label = ":proto_zero_plugin($host_toolchain)"
+ generator_plugin = rebase_path(
+ get_label_info(plugin_label, "root_out_dir") + "/proto_zero_plugin",
Primiano Tucci (use gerrit) 2016/07/13 16:52:32 uh, this is interestingly long. Did you take this
+ root_build_dir)
+
+ proto_out_dir = "components/tracing/proto_zero_plugin"
+ generator_plugin_suffix = ".zeropb"
+ generate_cc = false
+ generate_python = false
+
+ deps = [
+ plugin_label,
+ ]
+}

Powered by Google App Engine
This is Rietveld 408576698