summaryrefslogtreecommitdiff
path: root/cc/cc.go
diff options
context:
space:
mode:
author Yu Liu <yudiliu@google.com> 2024-12-10 00:58:06 +0000
committer Yu Liu <yudiliu@google.com> 2024-12-10 19:54:12 +0000
commitb73c3a6d221523f06d30c15145866056556187d0 (patch)
treeb97fd1cd15ff82875c41a49fbed48ed6662806e8 /cc/cc.go
parentd29a1a83c251f570d438487aafe51680e3ece76f (diff)
Convert checkApexAvailability to use ModuleProxy.
Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: I7582db8e22e94d0a9db7715a76bb6ed34c166a4e
Diffstat (limited to 'cc/cc.go')
-rw-r--r--cc/cc.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/cc/cc.go b/cc/cc.go
index 802332426..e51cfcf05 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -3689,13 +3689,18 @@ func (c *Module) IsInstallableToApex() bool {
}
func (c *Module) AvailableFor(what string) bool {
+ return android.CheckAvailableForApex(what, c.ApexAvailableFor())
+}
+
+func (c *Module) ApexAvailableFor() []string {
+ list := c.ApexModuleBase.ApexAvailable()
if linker, ok := c.linker.(interface {
- availableFor(string) bool
+ apexAvailable() []string
}); ok {
- return c.ApexModuleBase.AvailableFor(what) || linker.availableFor(what)
- } else {
- return c.ApexModuleBase.AvailableFor(what)
+ list = append(list, linker.apexAvailable()...)
}
+
+ return android.FirstUniqueStrings(list)
}
func (c *Module) EverInstallable() bool {