Merge "Ensure that *bootclasspath* module types depend on device variants" am: 1a6305f9e0

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2095251

Change-Id: Idd2936bb753856c411a1753474671f39baca33f5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2022-05-11 20:44:22 +00:00
committed by Automerger Merge Worker
3 changed files with 5 additions and 1 deletions

View File

@@ -84,6 +84,9 @@ func addDependencyOntoApexModulePair(ctx android.BottomUpMutatorContext, apex st
}
}
target := ctx.Module().Target()
variations = append(variations, target.Variations()...)
addedDep := false
if ctx.OtherModuleDependencyVariantExists(variations, name) {
ctx.AddFarVariationDependencies(variations, tag, name)

View File

@@ -273,7 +273,7 @@ func bootclasspathFragmentFactory() android.Module {
android.InitApexModule(m)
android.InitSdkAwareModule(m)
initClasspathFragment(m, BOOTCLASSPATH)
android.InitAndroidArchModule(m, android.HostAndDeviceSupported, android.MultilibCommon)
android.InitAndroidArchModule(m, android.DeviceSupported, android.MultilibCommon)
android.AddLoadHook(m, func(ctx android.LoadHookContext) {
// If code coverage has been enabled for the framework then append the properties with

View File

@@ -51,6 +51,7 @@ func TestPlatformBootclasspath(t *testing.T) {
var addSourceBootclassPathModule = android.FixtureAddTextFile("source/Android.bp", `
java_library {
name: "foo",
host_supported: true, // verify that b/232106778 is fixed
srcs: ["a.java"],
system_modules: "none",
sdk_version: "none",