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

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

Merge changes I7642c57b,I2120b40e

* changes:
  apex uses the first arch variant of prebuilt_etc modules
  sh_binary prefer 32bit when TARGET_PREFER_32_BIT
parents bdebb171 ce6aadc4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -196,6 +196,9 @@ func InitShBinaryModule(s *ShBinary) {
// executable binary to <partition>/bin.
func ShBinaryFactory() Module {
	module := &ShBinary{}
	module.Prefer32(func(ctx BaseModuleContext, base *ModuleBase, class OsClass) bool {
		return class == Device && ctx.Config().DevicePrefer32BitExecutables()
	})
	InitShBinaryModule(module)
	InitAndroidArchModule(module, HostAndDeviceSupported, MultilibFirst)
	return module
+16 −4
Original line number Diff line number Diff line
@@ -598,10 +598,6 @@ func (a *apexBundle) DepsMutator(ctx android.BottomUpMutatorContext) {
				a.properties.Multilib.First.Tests,
				target,
				a.getImageVariation(config))

			// When multilib.* is omitted for prebuilts, it implies multilib.first.
			ctx.AddFarVariationDependencies(target.Variations(),
				prebuiltTag, a.properties.Prebuilts...)
		}

		switch target.Arch.ArchType.Multilib {
@@ -652,6 +648,22 @@ func (a *apexBundle) DepsMutator(ctx android.BottomUpMutatorContext) {

	}

	// For prebuilt_etc, use the first variant (64 on 64/32bit device,
	// 32 on 32bit device) regardless of the TARGET_PREFER_* setting.
	// b/144532908
	archForPrebuiltEtc := config.Arches()[0]
	for _, arch := range config.Arches() {
		// Prefer 64-bit arch if there is any
		if arch.ArchType.Multilib == "lib64" {
			archForPrebuiltEtc = arch
			break
		}
	}
	ctx.AddFarVariationDependencies([]blueprint.Variation{
		{Mutator: "os", Variation: ctx.Os().String()},
		{Mutator: "arch", Variation: archForPrebuiltEtc.String()},
	}, prebuiltTag, a.properties.Prebuilts...)

	ctx.AddFarVariationDependencies(ctx.Config().AndroidCommonTarget.Variations(),
		javaLibTag, a.properties.Java_libs...)