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

Commit 3245b2cb authored by Colin Cross's avatar Colin Cross
Browse files

Don't add dependencies on uses-library modules in unbundled builds

Unbundled builds may not have definitions of shared libraries, and
they are not dexpreopted so the dependencies are not used anyways.

Test: manual
Change-Id: I89ad92f3b073422734f824ac3a8a3b9baf995ccb
parent 4b69c497
Loading
Loading
Loading
Loading
+12 −10
Original line number Diff line number Diff line
@@ -938,6 +938,7 @@ type usesLibrary struct {
}

func (u *usesLibrary) deps(ctx android.BottomUpMutatorContext, noFrameworkLibs bool) {
	if !ctx.Config().UnbundledBuild() {
		ctx.AddVariationDependencies(nil, usesLibTag, u.usesLibraryProperties.Uses_libs...)
		ctx.AddVariationDependencies(nil, usesLibTag, u.presentOptionalUsesLibs(ctx)...)
		if !noFrameworkLibs {
@@ -950,6 +951,7 @@ func (u *usesLibrary) deps(ctx android.BottomUpMutatorContext, noFrameworkLibs b
				"android.hidl.manager-V1.0-java")
		}
	}
}

// presentOptionalUsesLibs returns optional_uses_libs after filtering out MissingUsesLibraries, which don't exist in the
// build.