From 61e69fabe18856b653a1af253a8206102abed607 Mon Sep 17 00:00:00 2001 From: Vinh Tran Date: Tue, 14 Jun 2022 16:45:19 -0400 Subject: [PATCH] Remove uses of depfile in gensrcs modules The depfile concept in Soong and Ninja isn't applicable in Bazel because Bazel requires listing the deps explicitly. This CL removes the uses of depfile property and explictly declare the implicit deps in tool_files. The motivation behind this change is to eventually deprecate depfile (aosp/2120835) in gensrcs to ensure all gensrcs modules are convertable to Bazel. Test: CI Test: m framework-cppstream-protos && m framework-javastream-protos Bug: 179452413 Change-Id: Iec6b61b4194d3f1e728449ee63b879818d9c958a --- ProtoLibraries.bp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ProtoLibraries.bp b/ProtoLibraries.bp index d18154a761ec3..de84792c45bb2 100644 --- a/ProtoLibraries.bp +++ b/ProtoLibraries.bp @@ -14,7 +14,6 @@ gensrcs { name: "framework-javastream-protos", - depfile: true, tools: [ "aprotoc", @@ -22,10 +21,13 @@ gensrcs { "soong_zip", ], + tool_files: [ + ":libprotobuf-internal-protos", + ], + cmd: "mkdir -p $(genDir)/$(in) " + "&& $(location aprotoc) " + " --plugin=$(location protoc-gen-javastream) " + - " --dependency_out=$(depfile) " + " --javastream_out=$(genDir)/$(in) " + " -Iexternal/protobuf/src " + " -I . " + @@ -47,17 +49,19 @@ gensrcs { gensrcs { name: "framework-cppstream-protos", - depfile: true, tools: [ "aprotoc", "protoc-gen-cppstream", ], + tool_files: [ + ":libprotobuf-internal-protos", + ], + cmd: "mkdir -p $(genDir) " + "&& $(location aprotoc) " + " --plugin=$(location protoc-gen-cppstream) " + - " --dependency_out=$(depfile) " + " --cppstream_out=$(genDir) " + " -Iexternal/protobuf/src " + " -I . " +