summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2017-12-04 16:02:10 -0800
committer Colin Cross <ccross@android.com> 2017-12-05 01:09:52 +0000
commit6471db9b718b1aeddd861935c1c7780b0c0842c3 (patch)
tree0b74bb0d28f355908eb4e287c00425829ed81e78
parent85f095e24666f87d7270e0b4a5ce31c7bf29a67f (diff)
Don't use path to find protoc-gen-javastream
Previous attempts to use a full path in the --plugin argument failed, but that was because the --plugin argument had the wrong name (protoc-gen-java-stream instead of protoc-gen-javastream) and was being completely ignored. Passing a full path where the last element of the path is protoc-gen-javastream works fine. Fixes issues where the command line is expanded with $PATH in it 58 times which could hit command length limits if $PATH was even a little bit larger than the default. Test: m framework Change-Id: Icd336f522fb8770d9058d18d8a04d24a96405615
-rw-r--r--Android.bp6
1 files changed, 2 insertions, 4 deletions
diff --git a/Android.bp b/Android.bp
index 86e57476dd4f..c03530ee890c 100644
--- a/Android.bp
+++ b/Android.bp
@@ -603,11 +603,9 @@ gensrcs {
"soong_zip",
],
- // Append protoc-gen-javastream tool's PATH otherwise aprotoc can't find the plugin tool
- cmd: "export PATH=$$PATH:$$(dirname $(location protoc-gen-javastream)) " +
- "&& mkdir -p $(genDir)/$(in) " +
+ cmd: "mkdir -p $(genDir)/$(in) " +
"&& $(location aprotoc) " +
- " --plugin=protoc-gen-java-stream=protoc-gen-javastream " +
+ " --plugin=$(location protoc-gen-javastream) " +
" --dependency_out=$(depfile) " +
" --javastream_out=$(genDir)/$(in) " +
" -Iexternal/protobuf/src " +