Merge "Add a property to rust_ffi targets to exclude them from APEXes." into main am: a5762dd78b am: 8617c2d1bc

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

Change-Id: I152db50a2663efbc644edeadc41873644eb591ce
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2024-08-27 20:31:13 +00:00
committed by Automerger Merge Worker
3 changed files with 30 additions and 0 deletions

View File

@@ -2218,6 +2218,10 @@ func (a *apexBundle) depVisitor(vctx *visitorContext, ctx android.ModuleContext,
addAconfigFiles(vctx, ctx, child)
return true // track transitive dependencies
} else if rm, ok := child.(*rust.Module); ok {
if !android.IsDepInSameApex(ctx, am, am) {
return false
}
af := apexFileForRustLibrary(ctx, rm)
af.transitiveDep = true
vctx.filesInfo = append(vctx.filesInfo, af)
@@ -2237,6 +2241,10 @@ func (a *apexBundle) depVisitor(vctx *visitorContext, ctx android.ModuleContext,
}
} else if rust.IsDylibDepTag(depTag) {
if rustm, ok := child.(*rust.Module); ok && rustm.IsInstallableToApex() {
if !android.IsDepInSameApex(ctx, am, am) {
return false
}
af := apexFileForRustLibrary(ctx, rustm)
af.transitiveDep = true
vctx.filesInfo = append(vctx.filesInfo, af)