Refactor proto in preparation for java proto support

Test: m -j checkbuild
Change-Id: Idf00ea0bacb2777458f9af2c7eb47e1e1854eeba
This commit is contained in:
Colin Cross
2017-09-07 10:53:07 -07:00
parent ffe58feb76
commit 38f794ee49
7 changed files with 132 additions and 92 deletions

View File

@@ -153,9 +153,10 @@ func genSources(ctx android.ModuleContext, srcFiles android.Paths,
srcFiles[i] = cppFile
genLex(ctx, srcFile, cppFile)
case ".proto":
cppFile, headerFile := genProto(ctx, srcFile, buildFlags.protoFlags)
srcFiles[i] = cppFile
deps = append(deps, headerFile)
protoFiles := android.GenProto(ctx, srcFile, buildFlags.protoFlags,
"--cpp_out", "", []string{"pb.cc", "pb.h"})
srcFiles[i] = protoFiles[0]
deps = append(deps, protoFiles[1])
case ".aidl":
cppFile := android.GenPathWithExt(ctx, "aidl", srcFile, "cpp")
srcFiles[i] = cppFile