Add //visibility:override to allow control over inheritance
Visibility rules can be 'inherited' in one of two ways. Either from defaults or from a module that called ctx.CreateModule(...). Previously, in both cases the inheriting module could only append additional visibility rules to the end of the inherited rules. That made it impossible to restrict the visibility by removing or ignore inherited rules. The //visibility:override rectifies that by allowing the inheriting module to ignore all the rules that they would have inherited. It can only go at the beginning of a list of rules specified in a module but after defaults are applied it can end up in the middle of a list of rules. In that case it behaves as if all the rules up to and including the //visibility:override rule were discarded. It can be used with //visibility:private to override //visibility:public and vice versa. Bug: 155787200 Test: m nothing Merged-In: I8a9c9c5a1bdceaee387c08864ae2b34629e0d46f Change-Id: I8a9c9c5a1bdceaee387c08864ae2b34629e0d46f (cherry picked from commit 51084ff6)
Loading
Please register or sign in to comment