Move LLNDK and NDK versionSelectorMutator special cases into versionedInterface
Implement stubsVersions on *llndkStubDecorator and *stubDecorator to
handle the special cases in versionSelectorMutator.
Test: m checkbuild
Change-Id: Idc985c52f91450df42c0275b2b2acef3f2ed8868
diff --git a/cc/cc.go b/cc/cc.go
index 73fe762..dbe6346 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -717,9 +717,9 @@
return c.Properties.AlwaysSdk || Bool(c.Properties.Sdk_variant_only)
}
-func (c *Module) StubsVersions() []string {
+func (c *Module) StubsVersions(ctx android.BaseMutatorContext) []string {
if versioned, ok := c.linker.(versionedInterface); ok {
- return versioned.stubsVersions()
+ return versioned.stubsVersions(ctx)
}
panic(fmt.Errorf("StubsVersions called on non-library module: %q", c.BaseModuleName()))
}