Setting use_rro_for_product will automatically generate an RRO package
which contains resources with 'product="{PRODUCT_CHARACTERISTICS}"'. The
RRO package will be installed to /product partition. The app will be
compiled with '--product default', making the app identical to all
targets.
Motivation for this change is to minimize divergence of system.img.
Bug: 294799593
Test: boot and idmap2 dump
Change-Id: I549c2589c69eab7a1568510a7d1ff0c8a003f7ea
Some products clear PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS
in order to disable it. But oftentimes this clearing relies on
the fact that clearing a variable will also cause it to not
inherit from any already-inherited files. Starlark doesn't support
this inheritance behavior, so allow setting
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS to false so that it
can be explicetly disabled instead of relying on the clearing
behavior.
Bug: 221312707
Test: Manually
Change-Id: I03a227911c6985a65fc5d210682bbd4ac9bd6747
This is useful when a makefile will produces different artifacts
depending on other configuration. Having an allow-list that's too strict
can make it a little difficult to make progress.
Test: m nothing in follow-up
Change-Id: Ic8235912bcbaa8e249a752e042d4f42be4466e34
(cherry picked from commit 0b6fde311ac6bc2b64e69858382117a362645502)
main.mk was a bit cluttered/difficult to follow wth all the indents. Put
the logic in a separate file instead.
Test: m nothing
Change-Id: I545bcd117a6bcd33b520ad279be1bab9b2d89393