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
This commit is contained in:
Colin Cross
2020-10-01 15:58:11 -07:00
parent bbc941b0d0
commit 3572cf74f9
6 changed files with 42 additions and 43 deletions

View File

@@ -717,9 +717,9 @@ func (c *Module) AlwaysSdk() bool {
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()))
}