add [static|shared].apex_available to cc_library
apex_available property can be appended differently per the linkage type. This will be used to restrict certain libs (e.g. libc_malloc_debug) to an APEX while allowing them to be statically linkable from platform for testing purpose. Test: m (apex_test amended) Change-Id: I6dec23129c5ac93a3ef06fea28f26f240c0ba410
This commit is contained in:
10
cc/cc.go
10
cc/cc.go
@@ -2152,6 +2152,16 @@ func (c *Module) IsInstallableToApex() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (c *Module) AvailableFor(what string) bool {
|
||||
if linker, ok := c.linker.(interface {
|
||||
availableFor(string) bool
|
||||
}); ok {
|
||||
return c.ApexModuleBase.AvailableFor(what) || linker.availableFor(what)
|
||||
} else {
|
||||
return c.ApexModuleBase.AvailableFor(what)
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Module) installable() bool {
|
||||
return c.installer != nil && !c.Properties.PreventInstall && c.IsForPlatform() && c.outputFile.Valid()
|
||||
}
|
||||
|
Reference in New Issue
Block a user