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

Commit 6978879d authored by Cole Faust's avatar Cole Faust
Browse files

Remove dependencies on 1-variant fallback

This is just a first pass, there are still more issues to tackle.
But after this we start getting errors about genrules which require
more work to resolve, so I'll handle them in a separate cl.

Bug: 372091092
Test: m nothing --no-skip-soong-tests
Change-Id: Ibf8f6bca699ff7c3232495ae7fa2666c967ba90b
parent 527f3ad0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ type AconfigDeclarationsGroupProperties struct {
func AconfigDeclarationsGroupFactory() android.Module {
	module := &AconfigDeclarationsGroup{}
	module.AddProperties(&module.properties)
	android.InitAndroidModule(module)
	android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibCommon)
	android.InitDefaultableModule(module)
	return module
}
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ func TestAconfigDeclarationsGroup(t *testing.T) {
	`)

	// Check if aconfig_declarations_group module depends on the aconfig_library modules
	java.CheckModuleDependencies(t, result.TestContext, "my_group", "", []string{
	java.CheckModuleDependencies(t, result.TestContext, "my_group", "android_common", []string{
		`bar-java`,
		`foo-java`,
	})
+5 −0
Original line number Diff line number Diff line
@@ -1066,6 +1066,11 @@ func addVintfFragmentDeps(ctx BottomUpMutatorContext) {

	modPartition := mod.PartitionTag(deviceConfig)
	for _, vintf := range vintfModules {
		if vintf == nil {
			// TODO(b/372091092): Remove this. Having it gives us missing dependency errors instead
			// of nil pointer dereference errors, but we should resolve the missing dependencies.
			continue
		}
		if vintfModule, ok := vintf.(*vintfFragmentModule); ok {
			vintfPartition := vintfModule.PartitionTag(deviceConfig)
			if modPartition != vintfPartition {
+14 −13
Original line number Diff line number Diff line
@@ -82,14 +82,6 @@ func withFiles(files android.MockFS) android.FixturePreparer {
	return files.AddToFixture()
}

func withTargets(targets map[android.OsType][]android.Target) android.FixturePreparer {
	return android.FixtureModifyConfig(func(config android.Config) {
		for k, v := range targets {
			config.Targets[k] = v
		}
	})
}

// withNativeBridgeTargets sets configuration with targets including:
// - X86_64 (primary)
// - X86 (secondary)
@@ -4051,11 +4043,20 @@ func TestVndkApexWithBinder32(t *testing.T) {
			"libvndk27binder32.so": nil,
		}),
		withBinder32bit,
		withTargets(map[android.OsType][]android.Target{
			android.Android: {
				{Os: android.Android, Arch: android.Arch{ArchType: android.Arm, ArchVariant: "armv7-a-neon", Abi: []string{"armeabi-v7a"}},
					NativeBridge: android.NativeBridgeDisabled, NativeBridgeHostArchName: "", NativeBridgeRelativePath: ""},
			},
		android.FixtureModifyConfig(func(config android.Config) {
			target := android.Target{
				Os: android.Android,
				Arch: android.Arch{
					ArchType:    android.Arm,
					ArchVariant: "armv7-a-neon",
					Abi:         []string{"armeabi-v7a"},
				},
				NativeBridge:             android.NativeBridgeDisabled,
				NativeBridgeHostArchName: "",
				NativeBridgeRelativePath: "",
			}
			config.Targets[android.Android] = []android.Target{target}
			config.AndroidFirstDeviceTarget = target
		}),
	)

+5 −1
Original line number Diff line number Diff line
@@ -95,7 +95,11 @@ func apexVndkDepsMutator(mctx android.BottomUpMutatorContext) {
				// level for the primary architecture.
				a.Disable()
			} else {
				mctx.AddDependency(mctx.Module(), prebuiltTag, cc.VndkLibrariesTxtModules(vndkVersion, mctx)...)
				mctx.AddVariationDependencies(
					mctx.Config().AndroidFirstDeviceTarget.Variations(),
					prebuiltTag,
					cc.VndkLibrariesTxtModules(vndkVersion, mctx)...,
				)
			}
		}
	}
Loading