Simplify missing deps handling in buildBootImage
Previously, the buildBootImage function maintained a list of missingDeps that was returned from findAndCopyBootJars and was passed to various other methods that created ninja rules that depended on the files created by findAndCopyBootJars. The purpose of that list was basically to record that findAndCopyBootJars could not find some files so that the subsequent ninja rules could be marked as being in error. This changes avoids having to explicitly propagate the missing deps to each rule by instead having findAndCopyBootJars generate an error rule instead of a Cp rule for any missing file. That means that any attempt to build any rule that depends on the missing file will fail when the missing file is created. Bug: 177892522 Test: Add an unknown module to PRODUCT_BOOT_JARS lunch art_module_arm64 - Run each of the following targets and made sure it failed with a message indicating that the unknown module was missing. m SOONG_ALLOW_MISSING_DEPENDENCIES=true out/soong/module_arm64/dex_bootjars/boot.prof m SOONG_ALLOW_MISSING_DEPENDENCIES=true out/soong/generic_arm64/dex_bootjars/boot.bprof m SOONG_ALLOW_MISSING_DEPENDENCIES=true out/soong/generic_arm64/dex_bootjars/updatable-bcp-packages.txt Change-Id: Ib7196c128419fbffdfeb61c1c5d47a3b08d1e132
Loading
Please register or sign in to comment