diff --git a/apex/apex.go b/apex/apex.go index 5ce0e0573..e26849917 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -367,6 +367,7 @@ func addDependenciesForNativeModules(ctx android.BottomUpMutatorContext, {Mutator: "arch", Variation: arch}, {Mutator: "image", Variation: "core"}, {Mutator: "link", Variation: "shared"}, + {Mutator: "version", Variation: ""}, // "" is the non-stub variant }, sharedLibTag, native_shared_libs...) ctx.AddFarVariationDependencies([]blueprint.Variation{ diff --git a/apex/apex_test.go b/apex/apex_test.go index c7ef58efa..c01c40a76 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -276,13 +276,21 @@ func TestApexWithStubs(t *testing.T) { cc_library { name: "mylib3", - srcs: ["mylib.cpp"], - system_shared_libs: [], + srcs: ["mylib.cpp"], + shared_libs: ["mylib4"], + system_shared_libs: [], stl: "none", stubs: { versions: ["10", "11", "12"], }, } + + cc_library { + name: "mylib4", + srcs: ["mylib.cpp"], + system_shared_libs: [], + stl: "none", + } `) apexRule := ctx.ModuleForTests("myapex", "android_common_myapex").Rule("apexRule")