Merge "Work around b/70221552"
am: f06d3a9857
Change-Id: Iffc61f54cb3d8354911c29fd3c8fbf1c08229166
This commit is contained in:
22
Android.bp
22
Android.bp
@@ -735,22 +735,24 @@ gensrcs {
|
|||||||
name: "framework-javastream-protos",
|
name: "framework-javastream-protos",
|
||||||
depfile: true,
|
depfile: true,
|
||||||
|
|
||||||
|
tool_files: [ "tools/genprotos.sh", ],
|
||||||
tools: [
|
tools: [
|
||||||
"aprotoc",
|
"aprotoc",
|
||||||
"protoc-gen-javastream",
|
"protoc-gen-javastream",
|
||||||
"soong_zip",
|
"soong_zip",
|
||||||
],
|
],
|
||||||
|
|
||||||
cmd: "mkdir -p $(genDir)/$(in) " +
|
// TODO This should not be needed. If you set a custom OUT_DIR or OUT_DIR_COMMON_BASE you can
|
||||||
"&& $(location aprotoc) " +
|
// end up with a command that is extremely long, potentially going passed MAX_ARG_STRLEN due to
|
||||||
" --plugin=$(location protoc-gen-javastream) " +
|
// the way sbox rewrites the command. See b/70221552.
|
||||||
" --dependency_out=$(depfile) " +
|
cmd: "$(location tools/genprotos.sh) " +
|
||||||
" --javastream_out=$(genDir)/$(in) " +
|
" $(location aprotoc) " +
|
||||||
" -Iexternal/protobuf/src " +
|
" $(location protoc-gen-javastream) " +
|
||||||
" -I . " +
|
" $(location soong_zip) " +
|
||||||
" $(in) " +
|
" $(genDir) " +
|
||||||
"&& $(location soong_zip) -jar -o $(out) -C $(genDir)/$(in) -D $(genDir)/$(in)",
|
" $(depfile) " +
|
||||||
|
" $(in) " +
|
||||||
|
" $(out)",
|
||||||
srcs: [
|
srcs: [
|
||||||
"core/proto/**/*.proto",
|
"core/proto/**/*.proto",
|
||||||
"libs/incident/**/*.proto",
|
"libs/incident/**/*.proto",
|
||||||
|
|||||||
24
tools/genprotos.sh
Executable file
24
tools/genprotos.sh
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# TODO This should not be needed. If you set a custom OUT_DIR or OUT_DIR_COMMON_BASE you can
|
||||||
|
# end up with a command that is extremely long, potentially going passed MAX_ARG_STRLEN due to
|
||||||
|
# the way sbox rewrites the command. See b/70221552.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
location_aprotoc=$1
|
||||||
|
location_protoc=$2
|
||||||
|
location_soong_zip=$3
|
||||||
|
genDir=$4
|
||||||
|
depfile=$5
|
||||||
|
in=$6
|
||||||
|
out=$7
|
||||||
|
|
||||||
|
mkdir -p ${genDir}/${in} && \
|
||||||
|
${location_aprotoc} --plugin=${location_protoc} \
|
||||||
|
--dependency_out=${depfile} \
|
||||||
|
--javastream_out=${genDir}/${in} \
|
||||||
|
-Iexternal/protobuf/src \
|
||||||
|
-I . \
|
||||||
|
${in} && \
|
||||||
|
${location_soong_zip} -jar -o ${out} -C ${genDir}/${in} -D ${genDir}/${in}
|
||||||
Reference in New Issue
Block a user