Do not follow SDK member dependencies for APEX payloads.

Test: m nothing
Test: `m` with prebuilts/runtime in the manifest (along with other
  fixes)
Bug: 151303681
Change-Id: I450d476975c7ab4434228b8c4baf3af192142211
This commit is contained in:
Martin Stjernholm 2020-07-07 03:22:21 +01:00
parent 58c33f073d
commit cc77601d10
3 changed files with 23 additions and 8 deletions

View File

@ -79,6 +79,8 @@ func TestBasicSdkWithCc(t *testing.T) {
cc_library_shared {
name: "sdkmember",
system_shared_libs: [],
stl: "none",
apex_available: ["mysdkapex"],
}
sdk_snapshot {
@ -152,6 +154,13 @@ func TestBasicSdkWithCc(t *testing.T) {
key: "myapex.key",
certificate: ":myapex.cert",
}
apex {
name: "mysdkapex",
native_shared_libs: ["sdkmember"],
key: "myapex.key",
certificate: ":myapex.cert",
}
`)
sdkMemberV1 := result.ModuleForTests("sdkmember_mysdk_1", "android_arm64_armv8-a_shared_myapex").Rule("toc").Output

View File

@ -330,6 +330,11 @@ type dependencyTag struct {
blueprint.BaseDependencyTag
}
// Mark this tag so dependencies that use it are excluded from APEX contents.
func (t dependencyTag) ExcludeFromApexContents() {}
var _ android.ExcludeFromApexContentsTag = dependencyTag{}
// For dependencies from an in-development version of an SDK member to frozen versions of the same member
// e.g. libfoo -> libfoo.mysdk.11 and libfoo.mysdk.12
type sdkMemberVersionedDepTag struct {

View File

@ -44,14 +44,15 @@ func testSdkContext(bp string, fs map[string][]byte) (*android.TestContext, andr
` + cc.GatherRequiredDepsForTest(android.Android, android.Windows)
mockFS := map[string][]byte{
"build/make/target/product/security": nil,
"apex_manifest.json": nil,
"system/sepolicy/apex/myapex-file_contexts": nil,
"system/sepolicy/apex/myapex2-file_contexts": nil,
"myapex.avbpubkey": nil,
"myapex.pem": nil,
"myapex.x509.pem": nil,
"myapex.pk8": nil,
"build/make/target/product/security": nil,
"apex_manifest.json": nil,
"system/sepolicy/apex/myapex-file_contexts": nil,
"system/sepolicy/apex/myapex2-file_contexts": nil,
"system/sepolicy/apex/mysdkapex-file_contexts": nil,
"myapex.avbpubkey": nil,
"myapex.pem": nil,
"myapex.x509.pem": nil,
"myapex.pk8": nil,
}
cc.GatherRequiredFilesForTest(mockFS)