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

Commit dc14bd11 authored by Spandan Das's avatar Spandan Das
Browse files

Drop `common_first` special-case from `addRequiredDeps`

This special-case was added to prevent installation of both variants of
libraries listed in `required` of `java_binary`.
https://r.android.com/3293143 makes it an error for native libs to be
listed in `required` of `java_binary`.

Since this special-case is redundant now, we can remove it.

Test: presbumits
Change-Id: Ib6fe771f5c67d72935684ac8dcb275cf57337870
parent dceff5f9
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -1003,14 +1003,6 @@ func addRequiredDeps(ctx BottomUpMutatorContext) {
			return
		}

		// Do not create a dependency from common variant to arch variant for `common_first` modules
		if multilib, _ := decodeMultilib(ctx, ctx.Module().base()); multilib == string(MultilibCommonFirst) {
			commonVariant := ctx.Arch().ArchType.Multilib == ""
			if bothInAndroid && commonVariant && InList(target.Arch.ArchType.Multilib, []string{"lib32", "lib64"}) {
				return
			}
		}

		variation := target.Variations()
		if ctx.OtherModuleFarDependencyVariantExists(variation, depName) {
			ctx.AddFarVariationDependencies(variation, RequiredDepTag, depName)