diff options
author | Spandan Das <spandandas@google.com> | 2021-08-20 19:18:16 +0000 |
---|---|---|
committer | Spandan Das <spandandas@google.com> | 2021-08-30 16:20:44 +0000 |
commit | 02e36039d8353c4fa9da5ac9e0710c2cd53916f9 (patch) | |
tree | 2d683bfe6c5321a012b0378960fb1967563ae200 /java | |
parent | 6108c71d5e3392edcfd32687d050cb98b510b99f (diff) |
Skip dexbootjar check using AllowMissingDependencies flag
Soong checks that every module part of a bootclass_fragment provides a
dex boot jar file, even if the module is not a dependency of vendor.img
Using AllowMissingDepdencies() to skip this check allows vendors to be
more aggressive in removing projects from their source tree
Test: In build/soong, run go test ./...
Test: m nothing
Bug: 196306898
Bug: 192616764
Change-Id: I78b062afdc19a6a3251aa8552230f3fcf334b6fb
(cherry picked from commit 10ea4bf9d43455d2eafdc8c6d726517a11b99af7)
Diffstat (limited to 'java')
-rw-r--r-- | java/dexpreopt_bootjars.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go index 19c65cac7..f50705cc0 100644 --- a/java/dexpreopt_bootjars.go +++ b/java/dexpreopt_bootjars.go @@ -489,7 +489,11 @@ func copyBootJarsToPredefinedLocations(ctx android.ModuleContext, srcBootDexJars dst := dstBootJarsByModule[name] if src == nil { - ctx.ModuleErrorf("module %s does not provide a dex boot jar", name) + if !ctx.Config().AllowMissingDependencies() { + ctx.ModuleErrorf("module %s does not provide a dex boot jar", name) + } else { + ctx.AddMissingDependencies([]string{name}) + } } else if dst == nil { ctx.ModuleErrorf("module %s is not part of the boot configuration", name) } else { |