Apply EnforceRROExemptedTargets in Soong

As PRODUCT_ENFORCE_RRO_EXEMPTED_TARGETS is defined in make, define it in
soong accordingly

Bug: 150820813
Test: m
Change-Id: I309482b6ad439a7602127f68f2f7ffa856b9e192
Merged-In: I309482b6ad439a7602127f68f2f7ffa856b9e192
This commit is contained in:
Jeongik Cha
2020-03-09 12:37:05 +09:00
parent 39a06440cd
commit 8691f3f75c
2 changed files with 12 additions and 3 deletions

View File

@@ -862,6 +862,13 @@ func (c *config) ArtUseReadBarrier() bool {
func (c *config) EnforceRROForModule(name string) bool {
enforceList := c.productVariables.EnforceRROTargets
// TODO(b/150820813) Some modules depend on static overlay, remove this after eliminating the dependency.
exemptedList := c.productVariables.EnforceRROExemptedTargets
if exemptedList != nil {
if InList(name, exemptedList) {
return false
}
}
if enforceList != nil {
if InList("*", enforceList) {
return true

View File

@@ -190,6 +190,8 @@ type productVariables struct {
DeviceResourceOverlays []string `json:",omitempty"`
ProductResourceOverlays []string `json:",omitempty"`
EnforceRROTargets []string `json:",omitempty"`
// TODO(b/150820813) Some modules depend on static overlay, remove this after eliminating the dependency.
EnforceRROExemptedTargets []string `json:",omitempty"`
EnforceRROExcludedOverlays []string `json:",omitempty"`
AAPTCharacteristics *string `json:",omitempty"`