Include hermetic .img files in target_files.zip
https://r.android.com/3470135 disabled target_files.zip generation since
the previous implementation built two copies of .img files when building
droid. This increased full build times slightly.
This CL adds the build rule for creating the hermetic version of .img
files, but keeps it outside the transitive closure of droid.
Implementation details
- Split the monolithic cmd into three
- cmd1 assembles the staging dir and creates a timestamp file
- cmd2 depends on timestamp file and creates .img file using build_image
- cmd3 depends on timestamp file and creates a hermetic .img file using
build_image. It does so by creating an intermediate propfile with
`use_fixed_timestamp=true`
Bug: 393203512
Test: Built the soong target_files.zip locally
(There are some preexisting diffs with the make target_files.zip, which
I will resolve in ongoing work)
Change-Id: Ibd14da93a6534d5544deffa2c44bac3fb97052ad
diff --git a/filesystem/filesystem_test.go b/filesystem/filesystem_test.go
index d9bf242..37260c1 100644
--- a/filesystem/filesystem_test.go
+++ b/filesystem/filesystem_test.go
@@ -332,7 +332,7 @@
`)
filesystem := result.ModuleForTests("myfilesystem", "android_common_cov")
- inputs := filesystem.Output("myfilesystem.img").Implicits
+ inputs := filesystem.Output("staging_dir.timestamp").Implicits
android.AssertStringListContains(t, "filesystem should have libfoo(cov)",
inputs.Strings(),
"out/soong/.intermediates/libfoo/android_arm64_armv8-a_shared_cov/libfoo.so")