Simplify visibility rules that include //visibility:public
While it is invalid to mix //visibility:public with other rules in the visibility property in a .bp file tt was possible, by overriding defaults, to have //visibility:public mixed in with other rules in the effective visibility rules. That caused problems when those effective rules were used in an sdk snapshot. This change replaces any set of rules that include //visibility:public with just the //visibility:public rule. That simplifies those rules, making them cheaper to process and ensures that the effective rules are valid in the visibility property. Adding test support required some refactoring of the effectiveVisibilityRules(BaseModuleContext, ...) and underlying methods to take a Config instead of BaseModuleContext as the tests do not have access to BaseModuleContext. Bug: 142935992 Test: m nothing - new tests failed without change, work with it Add dex2oat to art-module-host-exports, build it and check the generated Android.bp file in the snapshot to ensure the visibility property for the dex2oat prebuilt does not mix //visibility:public with other rules. Change-Id: I08e7f0dcb40838d426fe88fedf69eae27b77473c
Loading
Please register or sign in to comment