summaryrefslogtreecommitdiff
path: root/apex/builder.go
diff options
context:
space:
mode:
author Laura Tsai <lauratsai@google.com> 2021-11-10 07:00:38 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2021-11-10 07:00:38 +0000
commit33b60e4983c262e283429e91b707d2660e32c80c (patch)
treeaf79033348d081646b82406ec390a561994e158d /apex/builder.go
parent45f97c6a1e712a771ce0eedf63dfa95269c27b57 (diff)
parentbe3c7eacfe852c3b3107fb58a5f1a355c6f887b8 (diff)
Merge "Revert "Add scripts to generate java APIs used by Mainline modules.""
Diffstat (limited to 'apex/builder.go')
-rw-r--r--apex/builder.go27
1 files changed, 5 insertions, 22 deletions
diff --git a/apex/builder.go b/apex/builder.go
index 2e21ddfa1..e22d69411 100644
--- a/apex/builder.go
+++ b/apex/builder.go
@@ -67,7 +67,6 @@ func init() {
pctx.HostBinToolVariable("sload_f2fs", "sload_f2fs")
pctx.HostBinToolVariable("make_erofs", "make_erofs")
pctx.HostBinToolVariable("apex_compression_tool", "apex_compression_tool")
- pctx.HostBinToolVariable("dexdeps", "dexdeps")
pctx.SourcePathVariable("genNdkUsedbyApexPath", "build/soong/scripts/gen_ndk_usedby_apex.sh")
}
@@ -708,12 +707,12 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) {
"readelf": "${config.ClangBin}/llvm-readelf",
},
})
- a.nativeApisUsedByModuleFile = apisUsedbyOutputFile
+ a.apisUsedByModuleFile = apisUsedbyOutputFile
- var nativeLibNames []string
+ var libNames []string
for _, f := range a.filesInfo {
if f.class == nativeSharedLib {
- nativeLibNames = append(nativeLibNames, f.stem())
+ libNames = append(libNames, f.stem())
}
}
apisBackedbyOutputFile := android.PathForModuleOut(ctx, a.Name()+"_backing.txt")
@@ -721,25 +720,9 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) {
rule.Command().
Tool(android.PathForSource(ctx, "build/soong/scripts/gen_ndk_backedby_apex.sh")).
Output(apisBackedbyOutputFile).
- Flags(nativeLibNames)
+ Flags(libNames)
rule.Build("ndk_backedby_list", "Generate API libraries backed by Apex")
- a.nativeApisBackedByModuleFile = apisBackedbyOutputFile
-
- var javaLibOrApkPath []android.Path
- for _, f := range a.filesInfo {
- if f.class == javaSharedLib || f.class == app {
- javaLibOrApkPath = append(javaLibOrApkPath, f.builtFile)
- }
- }
- javaApiUsedbyOutputFile := android.PathForModuleOut(ctx, a.Name()+"_using.xml")
- javaUsedByRule := android.NewRuleBuilder(pctx, ctx)
- javaUsedByRule.Command().
- Tool(android.PathForSource(ctx, "build/soong/scripts/gen_java_usedby_apex.sh")).
- BuiltTool("dexdeps").
- Output(javaApiUsedbyOutputFile).
- Inputs(javaLibOrApkPath)
- javaUsedByRule.Build("java_usedby_list", "Generate Java APIs used by Apex")
- a.javaApisUsedByModuleFile = javaApiUsedbyOutputFile
+ a.apisBackedByModuleFile = apisBackedbyOutputFile
bundleConfig := a.buildBundleConfig(ctx)