Merge "Revert "Allow dependencies from platform variants to APEX modules."" am: 6f77314381
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1660243 Change-Id: I5632ea7d16b0efec256bfdf094946051f9221e58
This commit is contained in:
commit
72d1c2f38e
14
apex/apex.go
14
apex/apex.go
|
@ -1049,16 +1049,6 @@ func apexMutator(mctx android.BottomUpMutatorContext) {
|
||||||
if a, ok := mctx.Module().(*apexBundle); ok && !a.vndkApex {
|
if a, ok := mctx.Module().(*apexBundle); ok && !a.vndkApex {
|
||||||
apexBundleName := mctx.ModuleName()
|
apexBundleName := mctx.ModuleName()
|
||||||
mctx.CreateVariations(apexBundleName)
|
mctx.CreateVariations(apexBundleName)
|
||||||
if strings.HasPrefix(apexBundleName, "com.android.art") {
|
|
||||||
// Create an alias from the platform variant. This is done to make
|
|
||||||
// test_for dependencies work for modules that are split by the APEX
|
|
||||||
// mutator, since test_for dependencies always go to the platform variant.
|
|
||||||
// This doesn't happen for normal APEXes that are disjunct, so only do
|
|
||||||
// this for the overlapping ART APEXes.
|
|
||||||
// TODO(b/183882457): Remove this if the test_for functionality is
|
|
||||||
// refactored to depend on the proper APEX variants instead of platform.
|
|
||||||
mctx.CreateAliasVariation("", apexBundleName)
|
|
||||||
}
|
|
||||||
} else if o, ok := mctx.Module().(*OverrideApex); ok {
|
} else if o, ok := mctx.Module().(*OverrideApex); ok {
|
||||||
apexBundleName := o.GetOverriddenModuleName()
|
apexBundleName := o.GetOverriddenModuleName()
|
||||||
if apexBundleName == "" {
|
if apexBundleName == "" {
|
||||||
|
@ -1066,10 +1056,6 @@ func apexMutator(mctx android.BottomUpMutatorContext) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
mctx.CreateVariations(apexBundleName)
|
mctx.CreateVariations(apexBundleName)
|
||||||
if strings.HasPrefix(apexBundleName, "com.android.art") {
|
|
||||||
// TODO(b/183882457): See note for CreateAliasVariation above.
|
|
||||||
mctx.CreateAliasVariation("", apexBundleName)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6913,56 +6913,6 @@ func TestIndirectTestFor(t *testing.T) {
|
||||||
ensureLinkedLibIs("myprivlib", "android_arm64_armv8-a_shared", "out/soong/.intermediates/mylib/", "android_arm64_armv8-a_shared/mylib.so")
|
ensureLinkedLibIs("myprivlib", "android_arm64_armv8-a_shared", "out/soong/.intermediates/mylib/", "android_arm64_armv8-a_shared/mylib.so")
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestTestForForLibInOtherApex(t *testing.T) {
|
|
||||||
// This case is only allowed for known overlapping APEXes, i.e. the ART APEXes.
|
|
||||||
_ = testApex(t, `
|
|
||||||
apex {
|
|
||||||
name: "com.android.art",
|
|
||||||
key: "myapex.key",
|
|
||||||
native_shared_libs: ["mylib"],
|
|
||||||
updatable: false,
|
|
||||||
}
|
|
||||||
|
|
||||||
apex {
|
|
||||||
name: "com.android.art.debug",
|
|
||||||
key: "myapex.key",
|
|
||||||
native_shared_libs: ["mylib", "mytestlib"],
|
|
||||||
updatable: false,
|
|
||||||
}
|
|
||||||
|
|
||||||
apex_key {
|
|
||||||
name: "myapex.key",
|
|
||||||
public_key: "testkey.avbpubkey",
|
|
||||||
private_key: "testkey.pem",
|
|
||||||
}
|
|
||||||
|
|
||||||
cc_library {
|
|
||||||
name: "mylib",
|
|
||||||
srcs: ["mylib.cpp"],
|
|
||||||
system_shared_libs: [],
|
|
||||||
stl: "none",
|
|
||||||
stubs: {
|
|
||||||
versions: ["1"],
|
|
||||||
},
|
|
||||||
apex_available: ["com.android.art", "com.android.art.debug"],
|
|
||||||
}
|
|
||||||
|
|
||||||
cc_library {
|
|
||||||
name: "mytestlib",
|
|
||||||
srcs: ["mylib.cpp"],
|
|
||||||
system_shared_libs: [],
|
|
||||||
shared_libs: ["mylib"],
|
|
||||||
stl: "none",
|
|
||||||
apex_available: ["com.android.art.debug"],
|
|
||||||
test_for: ["com.android.art"],
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
android.MockFS{
|
|
||||||
"system/sepolicy/apex/com.android.art-file_contexts": nil,
|
|
||||||
"system/sepolicy/apex/com.android.art.debug-file_contexts": nil,
|
|
||||||
}.AddToFixture())
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO(jungjw): Move this to proptools
|
// TODO(jungjw): Move this to proptools
|
||||||
func intPtr(i int) *int {
|
func intPtr(i int) *int {
|
||||||
return &i
|
return &i
|
||||||
|
|
Loading…
Reference in New Issue