Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b040e73c authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Use AddReverseVariationDependency to avoid 1-variant fallback" into main

parents 3458f60b a0463d3c
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import (
	"android/soong/android"
	"android/soong/cc"

	"github.com/google/blueprint"
	"github.com/google/blueprint/proptools"
)

@@ -66,7 +67,14 @@ func apexVndkDepsMutator(mctx android.BottomUpMutatorContext) {
		vndkApexName := "com.android.vndk." + vndkVersion

		if mctx.OtherModuleExists(vndkApexName) {
			mctx.AddReverseDependency(mctx.Module(), sharedLibTag, vndkApexName)
			// Reverse dependencies must exactly specify the variant they want, starting from the
			// current module's variant. But unlike cc modules, the vndk apex doesn't have
			// arch/image/link variations, so we explicitly remove them here.
			mctx.AddReverseVariationDependency([]blueprint.Variation{
				{Mutator: "arch", Variation: "common"},
				{Mutator: "image", Variation: ""},
				{Mutator: "link", Variation: ""},
			}, sharedLibTag, vndkApexName)
		}
	} else if a, ok := mctx.Module().(*apexBundle); ok && a.vndkApex {
		if a.IsNativeBridgeSupported() {