Merge "Revert "Automated NDK API coverage used by Mainline modules build integration.""
This commit is contained in:
@@ -450,21 +450,12 @@ func (a *apexBundle) androidMkForType() android.AndroidMkData {
|
||||
fmt.Fprintf(w, dist)
|
||||
}
|
||||
|
||||
if a.apisUsedByModuleFile.String() != "" {
|
||||
if a.coverageOutputPath.String() != "" {
|
||||
goal := "apps_only"
|
||||
distFile := a.apisUsedByModuleFile.String()
|
||||
distFile := a.coverageOutputPath.String()
|
||||
fmt.Fprintf(w, "ifneq (,$(filter $(my_register_name),$(TARGET_BUILD_APPS)))\n"+
|
||||
" $(call dist-for-goals,%s,%s:ndk_apis_usedby_apex/$(notdir %s))\n"+
|
||||
"endif\n",
|
||||
goal, distFile, distFile)
|
||||
}
|
||||
|
||||
if a.apisBackedByModuleFile.String() != "" {
|
||||
goal := "apps_only"
|
||||
distFile := a.apisBackedByModuleFile.String()
|
||||
fmt.Fprintf(w, "ifneq (,$(filter $(my_register_name),$(TARGET_BUILD_APPS)))\n"+
|
||||
" $(call dist-for-goals,%s,%s:ndk_apis_backedby_apex/$(notdir %s))\n"+
|
||||
"endif\n",
|
||||
"endif",
|
||||
goal, distFile, distFile)
|
||||
}
|
||||
}
|
||||
|
@@ -390,8 +390,7 @@ type apexBundle struct {
|
||||
isCompressed bool
|
||||
|
||||
// Path of API coverage generate file
|
||||
apisUsedByModuleFile android.ModuleOutPath
|
||||
apisBackedByModuleFile android.ModuleOutPath
|
||||
coverageOutputPath android.ModuleOutPath
|
||||
}
|
||||
|
||||
// apexFileClass represents a type of file that can be included in APEX.
|
||||
|
@@ -687,7 +687,7 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) {
|
||||
implicitInputs = append(implicitInputs, unsignedOutputFile)
|
||||
|
||||
// Run coverage analysis
|
||||
apisUsedbyOutputFile := android.PathForModuleOut(ctx, a.Name()+"_using.txt")
|
||||
apisUsedbyOutputFile := android.PathForModuleOut(ctx, a.Name()+".txt")
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: generateAPIsUsedbyApexRule,
|
||||
Implicits: implicitInputs,
|
||||
@@ -698,19 +698,7 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) {
|
||||
"readelf": "${config.ClangBin}/llvm-readelf",
|
||||
},
|
||||
})
|
||||
a.apisUsedByModuleFile = apisUsedbyOutputFile
|
||||
|
||||
apisBackedbyOutputFile := android.PathForModuleOut(ctx, a.Name()+"_backing.txt")
|
||||
ndkLibraryList := android.PathForSource(ctx, "system/core/rootdir/etc/public.libraries.android.txt")
|
||||
rule := android.NewRuleBuilder(pctx, ctx)
|
||||
rule.Command().
|
||||
Tool(android.PathForSource(ctx, "build/soong/scripts/gen_ndk_backedby_apex.sh")).
|
||||
Text(imageDir.String()).
|
||||
Implicits(implicitInputs).
|
||||
Output(apisBackedbyOutputFile).
|
||||
Input(ndkLibraryList)
|
||||
rule.Build("ndk_backedby_list", "Generate API libraries backed by Apex")
|
||||
a.apisBackedByModuleFile = apisBackedbyOutputFile
|
||||
a.coverageOutputPath = apisUsedbyOutputFile
|
||||
|
||||
bundleConfig := a.buildBundleConfig(ctx)
|
||||
|
||||
|
Reference in New Issue
Block a user