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

Unified Diff: third_party/protobuf/proto_library.gni

Issue 2646123002: Option added to protobuf build for import directories (Closed)
Patch Set: Comments addressed. Created 3 years, 11 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
« no previous file with comments | « no previous file | tools/protoc_wrapper/protoc_wrapper.py » ('j') | tools/protoc_wrapper/protoc_wrapper.py » ('J')
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 7c74e4ef8e422b7ce8d29a5d668c2d44c46a23d7..e3fd1817ea2c2b63123f1b448bc20d0ad8eabdeb 100644
--- a/third_party/protobuf/proto_library.gni
+++ b/third_party/protobuf/proto_library.gni
@@ -63,6 +63,10 @@
# If adding protobuf library would be required, adds protobuf_full to deps
# instead of protobuf_lite.
#
+# import_dirs (optional)
+# A list of extra import directories to be passed to protoc compiler. The
+# default case is just proto_in_dir.
+#
# Parameters for compiling the generated code:
#
# component_build_force_source_set (Default=false)
@@ -277,6 +281,11 @@ template("proto_library") {
}
}
+ if (defined(invoker.import_dirs)) {
+ args += ["--import-dir"]
xyzzyz 2017/01/23 17:53:56 I was under impression before that the way this fl
Dirk Pranke 2017/01/24 02:31:20 argparse will actually accept either, but the latt
Ramin Halavati 2017/01/24 08:38:33 Done, changed it to one --import-dir switch for ea
+ args += rebase_path(invoker.import_dirs, root_build_dir)
+ }
+
# System protoc is not used so it's necessary to build a chromium one.
inputs = [
protoc_path,
« no previous file with comments | « no previous file | tools/protoc_wrapper/protoc_wrapper.py » ('j') | tools/protoc_wrapper/protoc_wrapper.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698