Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b2f181d3 authored by Anton Hansson's avatar Anton Hansson Committed by android-build-merger
Browse files

Merge "Revert "Work around b/70221552""

am: 79995a56

Change-Id: I0c64d82620accd179b64d5bb17e04270285bf4a9
parents a8aa26d1 79995a56
Loading
Loading
Loading
Loading
+10 −12
Original line number Diff line number Diff line
@@ -520,24 +520,22 @@ gensrcs {
    name: "framework-javastream-protos",
    depfile: true,

    tool_files: ["tools/genprotos.sh"],
    tools: [
        "aprotoc",
        "protoc-gen-javastream",
        "soong_zip",
    ],

    // 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.
    cmd: "$(location tools/genprotos.sh) " +
        " $(location aprotoc) " +
        " $(location protoc-gen-javastream) " +
        " $(location soong_zip) " +
        " $(genDir) " +
        " $(depfile) " +
    cmd: "mkdir -p $(genDir)/$(in) " +
        "&& $(location aprotoc) " +
        "  --plugin=$(location protoc-gen-javastream) " +
        "  --dependency_out=$(depfile) " +
        "  --javastream_out=$(genDir)/$(in) " +
        "  -Iexternal/protobuf/src " +
        "  -I . " +
        "  $(in) " +
        " $(out)",
        "&& $(location soong_zip) -jar -o $(out) -C $(genDir)/$(in) -D $(genDir)/$(in)",

    srcs: [
        "core/proto/**/*.proto",
        "libs/incident/**/*.proto",

tools/genprotos.sh

deleted100755 → 0
+0 −24
Original line number Diff line number Diff line
#!/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}