Revert "Convert cc modules to use AndroidMkInfoProvider."
This reverts commit 5640008749795a6ebfb2680e28daa6b067207ce8.
Reason for revert: Droidmonitor created revert due to b/374130363. Will be verifying through ABTD before submission.
Change-Id: Iced10a8b71766826465966e9370cdd5e347e7b79
diff --git a/cc/prebuilt_test.go b/cc/prebuilt_test.go
index 3214fb4..acbbabc 100644
--- a/cc/prebuilt_test.go
+++ b/cc/prebuilt_test.go
@@ -50,7 +50,6 @@
cc_prebuilt_library_shared {
name: "liba",
srcs: ["liba.so"],
- prefer: true,
}
cc_library {
@@ -60,7 +59,6 @@
cc_prebuilt_library_static {
name: "libb",
srcs: ["libb.a"],
- prefer: true,
}
cc_library_shared {
@@ -171,9 +169,9 @@
t.Errorf("crtx missing dependency on prebuilt_crtx")
}
- entries := android.AndroidMkInfoForTest(t, ctx, prebuiltLiba).PrimaryInfo
+ entries := android.AndroidMkEntriesForTest(t, ctx, prebuiltLiba)[0]
android.AssertStringEquals(t, "unexpected LOCAL_SOONG_MODULE_TYPE", "cc_prebuilt_library_shared", entries.EntryMap["LOCAL_SOONG_MODULE_TYPE"][0])
- entries = android.AndroidMkInfoForTest(t, ctx, prebuiltLibb).PrimaryInfo
+ entries = android.AndroidMkEntriesForTest(t, ctx, prebuiltLibb)[0]
android.AssertStringEquals(t, "unexpected LOCAL_SOONG_MODULE_TYPE", "cc_prebuilt_library_static", entries.EntryMap["LOCAL_SOONG_MODULE_TYPE"][0])
}
@@ -488,7 +486,7 @@
expectedDependency := ctx.ModuleForTests(tc.expectedDependencyName, "android_arm64_armv8-a_shared").Module()
android.AssertBoolEquals(t, fmt.Sprintf("expected dependency from %s to %s\n", libfoo.Name(), tc.expectedDependencyName), true, hasDep(ctx, libfoo, expectedDependency))
// check that LOCAL_SHARED_LIBRARIES contains libbar and not libbar.v<N>
- entries := android.AndroidMkInfoForTest(t, ctx, libfoo).PrimaryInfo
+ entries := android.AndroidMkEntriesForTest(t, ctx, libfoo)[0]
android.AssertStringListContains(t, "Version should not be present in LOCAL_SHARED_LIBRARIES", entries.EntryMap["LOCAL_SHARED_LIBRARIES"], "libbar")
// check installation rules
@@ -498,7 +496,7 @@
// check LOCAL_MODULE of the selected module name
// the prebuilt should have the same LOCAL_MODULE when exported to make
- entries = android.AndroidMkInfoForTest(t, ctx, libbar).PrimaryInfo
+ entries = android.AndroidMkEntriesForTest(t, ctx, libbar)[0]
android.AssertStringEquals(t, "unexpected LOCAL_MODULE", "libbar", entries.EntryMap["LOCAL_MODULE"][0])
}
}