Disable boot jars package check if no boot jars have been configured
Some build configurations do not configure boot jars. In those cases the boot jars package check fails so should be skipped. Bug: 177892522 Test: m nothing lunch fvp_mini && m Change-Id: I5498a8f5cdfb2fabf5223e94dfcee0e853059d01
This commit is contained in:
@@ -31,13 +31,18 @@ func isActiveModule(module android.Module) bool {
|
|||||||
// buildRuleForBootJarsPackageCheck generates the build rule to perform the boot jars package
|
// buildRuleForBootJarsPackageCheck generates the build rule to perform the boot jars package
|
||||||
// check.
|
// check.
|
||||||
func buildRuleForBootJarsPackageCheck(ctx android.ModuleContext, bootDexJarByModule bootDexJarByModule) {
|
func buildRuleForBootJarsPackageCheck(ctx android.ModuleContext, bootDexJarByModule bootDexJarByModule) {
|
||||||
|
bootDexJars := bootDexJarByModule.bootDexJarsWithoutCoverage()
|
||||||
|
if len(bootDexJars) == 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
timestamp := android.PathForOutput(ctx, "boot-jars-package-check/stamp")
|
timestamp := android.PathForOutput(ctx, "boot-jars-package-check/stamp")
|
||||||
|
|
||||||
rule := android.NewRuleBuilder(pctx, ctx)
|
rule := android.NewRuleBuilder(pctx, ctx)
|
||||||
rule.Command().BuiltTool("check_boot_jars").
|
rule.Command().BuiltTool("check_boot_jars").
|
||||||
Input(ctx.Config().HostToolPath(ctx, "dexdump")).
|
Input(ctx.Config().HostToolPath(ctx, "dexdump")).
|
||||||
Input(android.PathForSource(ctx, "build/soong/scripts/check_boot_jars/package_allowed_list.txt")).
|
Input(android.PathForSource(ctx, "build/soong/scripts/check_boot_jars/package_allowed_list.txt")).
|
||||||
Inputs(bootDexJarByModule.bootDexJarsWithoutCoverage()).
|
Inputs(bootDexJars).
|
||||||
Text("&& touch").Output(timestamp)
|
Text("&& touch").Output(timestamp)
|
||||||
rule.Build("boot_jars_package_check", "check boot jar packages")
|
rule.Build("boot_jars_package_check", "check boot jar packages")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user