Soong system image may update the $PRODUCT_OUT

A target must define "USE_SOONG_DEFINED_SYSTEM_IMAGE := true" and
"PRODUCT_SOONG_DEFINED_SYSTEM_IMAGE := <name of soong system image>"
to use the soong defined system image.
The system image must install the files to $PRODUCT_OUT for adb sync
and build verification. Instead of using 'update_product_out'
property in Android.bp, copy the files only if the name of the image
matches with PRODUCT_SOONG_DEFINED_SYSTEM_IMAGE.

Bug: 350599535
Bug: 365700376
Test: lunch aosp_x86_64-trunk_staging-userdebug && m &&
      m aosp_cf_system_x86_64
Test: lunch aosp_cf_x86_64_phone_soong_system-trunk_staging-userdebug
      && m
      and adb sync on the cf device
Change-Id: If8673ba2855a753a5559a588bd83068d950fd7e4
This commit is contained in:
Justin Yun
2024-09-11 14:10:20 +09:00
parent 1705fef470
commit 2cc42505d9
3 changed files with 15 additions and 4 deletions

View File

@@ -1663,6 +1663,17 @@ func (c *config) ApexTrimEnabled() bool {
return Bool(c.productVariables.TrimmedApex)
}
func (c *config) UseSoongSystemImage() bool {
return Bool(c.productVariables.UseSoongSystemImage)
}
func (c *config) SoongDefinedSystemImage() string {
if c.UseSoongSystemImage() {
return String(c.productVariables.ProductSoongDefinedSystemImage)
}
return ""
}
func (c *config) EnforceSystemCertificate() bool {
return Bool(c.productVariables.EnforceSystemCertificate)
}