Remove apex10000_private variants
When a library is included in two APEXes whose platform_apis settings are different, two apex variants of the library is created: apex1000 and apex1000_private. This change was introduced with ag/15061306, especially by the commit [1]. However, that part should be reverted because it actually creates unnecessary variants. It's unnecessary because the two variants of the library are compiled (excluding the linking) exactly the same. If a private symbol of its dependency was actually used when compiling the apex1000_private variant, then the other apex1000 variant wouldn't have been built because that private symbol must have caused a linkage error. [1] https://googleplex-android-review.git.corp.google.com/c/platform/build/soong/+/15061306/2..4/android/apex.go#b527). Bug: 228785792 Test: m Change-Id: Id58d3e98a51de5e628ca72ef86e9cd11b0ee8971
This commit is contained in:
@@ -118,17 +118,30 @@ func Test_mergeApexVariations(t *testing.T) {
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "don't merge different UsePlatformApis",
|
||||
name: "merge different UsePlatformApis but don't allow using platform api",
|
||||
in: []ApexInfo{
|
||||
{"foo", FutureApiLevel, false, false, nil, []string{"foo"}, []string{"foo"}, nil, NotForPrebuiltApex},
|
||||
{"bar", FutureApiLevel, false, true, nil, []string{"bar"}, []string{"bar"}, nil, NotForPrebuiltApex},
|
||||
},
|
||||
wantMerged: []ApexInfo{
|
||||
{"apex10000_private", FutureApiLevel, false, true, nil, []string{"bar"}, []string{"bar"}, nil, NotForPrebuiltApex},
|
||||
{"apex10000", FutureApiLevel, false, false, nil, []string{"foo"}, []string{"foo"}, nil, NotForPrebuiltApex},
|
||||
{"apex10000", FutureApiLevel, false, false, nil, []string{"bar", "foo"}, []string{"bar", "foo"}, nil, NotForPrebuiltApex},
|
||||
},
|
||||
wantAliases: [][2]string{
|
||||
{"bar", "apex10000_private"},
|
||||
{"bar", "apex10000"},
|
||||
{"foo", "apex10000"},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "merge same UsePlatformApis and allow using platform api",
|
||||
in: []ApexInfo{
|
||||
{"foo", FutureApiLevel, false, true, nil, []string{"foo"}, []string{"foo"}, nil, NotForPrebuiltApex},
|
||||
{"bar", FutureApiLevel, false, true, nil, []string{"bar"}, []string{"bar"}, nil, NotForPrebuiltApex},
|
||||
},
|
||||
wantMerged: []ApexInfo{
|
||||
{"apex10000", FutureApiLevel, false, true, nil, []string{"bar", "foo"}, []string{"bar", "foo"}, nil, NotForPrebuiltApex},
|
||||
},
|
||||
wantAliases: [][2]string{
|
||||
{"bar", "apex10000"},
|
||||
{"foo", "apex10000"},
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user