Merge "Add property to apex soong modules to generate an APEX without hashtree"

This commit is contained in:
Treehugger Robot
2019-12-11 01:51:48 +00:00
committed by Gerrit Code Review
2 changed files with 13 additions and 1 deletions

View File

@@ -375,7 +375,11 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) {
optFlags = append(optFlags, "--assets_dir "+filepath.Dir(noticeFile.String()))
}
if !ctx.Config().UnbundledBuild() && a.installable() {
if ctx.ModuleDir() != "system/apex/apexd/apexd_testdata" && a.testOnlyShouldSkipHashtreeGeneration() {
ctx.PropertyErrorf("test_only_no_hashtree", "not available")
return
}
if (!ctx.Config().UnbundledBuild() && a.installable()) || a.testOnlyShouldSkipHashtreeGeneration() {
// Apexes which are supposed to be installed in builtin dirs(/system, etc)
// don't need hashtree for activation. Therefore, by removing hashtree from
// apex bundle (filesystem image in it, to be specific), we can save storage.