Stubs libs are available for host

The runtime APEX is built for host as well as for target. Therefore
stubs libs should be available also for host.

Bug: 120670568
Test: follow the repro step shown in b/120670568#comment4
Change-Id: I350fe490848ae9ceb55aade0521bdfaf48ed083f
This commit is contained in:
Jiyong Park 2018-12-13 12:01:31 +09:00
parent 0ddfcd1188
commit 0fefdeac91
2 changed files with 1 additions and 5 deletions

View File

@ -1107,7 +1107,7 @@ func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) {
addSharedLibDependencies := func(depTag dependencyTag, name string, version string) {
var variations []blueprint.Variation
variations = append(variations, blueprint.Variation{Mutator: "link", Variation: "shared"})
versionVariantAvail := ctx.Os() == android.Android && !ctx.useVndk() && !c.inRecovery()
versionVariantAvail := !ctx.useVndk() && !c.inRecovery()
if version != "" && versionVariantAvail {
// Version is explicitly specified. i.e. libFoo#30
variations = append(variations, blueprint.Variation{Mutator: "version", Variation: version})

View File

@ -1016,10 +1016,6 @@ func latestStubsVersionFor(config android.Config, name string) string {
// Version mutator splits a module into the mandatory non-stubs variant
// (which is unnamed) and zero or more stubs variants.
func VersionMutator(mctx android.BottomUpMutatorContext) {
if mctx.Os() != android.Android {
return
}
if m, ok := mctx.Module().(*Module); ok && !m.inRecovery() && m.linker != nil {
if library, ok := m.linker.(*libraryDecorator); ok && library.buildShared() &&
len(library.Properties.Stubs.Versions) > 0 {