Merge "Fix rust snapshotInfo provider bug" am: 553d89a825
am: 073e939604
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2516919 Change-Id: Id79460e2cf4ff396cc3f9c90f73b8ea2ef0b2f20 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -1515,7 +1515,7 @@ func (mod *Module) DepsMutator(actx android.BottomUpMutatorContext) {
|
|||||||
for _, lib := range deps.Rustlibs {
|
for _, lib := range deps.Rustlibs {
|
||||||
if autoDep.depTag == rlibDepTag {
|
if autoDep.depTag == rlibDepTag {
|
||||||
// Handle the rlib deptag case
|
// Handle the rlib deptag case
|
||||||
addRlibDependency(actx, lib, mod, snapshotInfo, rlibDepVariations)
|
addRlibDependency(actx, lib, mod, &snapshotInfo, rlibDepVariations)
|
||||||
} else {
|
} else {
|
||||||
// autoDep.depTag is a dylib depTag. Not all rustlibs may be available as a dylib however.
|
// autoDep.depTag is a dylib depTag. Not all rustlibs may be available as a dylib however.
|
||||||
// Check for the existence of the dylib deptag variant. Select it if available,
|
// Check for the existence of the dylib deptag variant. Select it if available,
|
||||||
@@ -1526,7 +1526,7 @@ func (mod *Module) DepsMutator(actx android.BottomUpMutatorContext) {
|
|||||||
actx.AddVariationDependencies(autoDepVariations, autoDep.depTag, lib)
|
actx.AddVariationDependencies(autoDepVariations, autoDep.depTag, lib)
|
||||||
} else {
|
} else {
|
||||||
// If there's no dylib dependency available, try to add the rlib dependency instead.
|
// If there's no dylib dependency available, try to add the rlib dependency instead.
|
||||||
addRlibDependency(actx, lib, mod, snapshotInfo, rlibDepVariations)
|
addRlibDependency(actx, lib, mod, &snapshotInfo, rlibDepVariations)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1617,8 +1617,8 @@ func (mod *Module) DepsMutator(actx android.BottomUpMutatorContext) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// addRlibDependency will add an rlib dependency, rewriting to the snapshot library if available.
|
// addRlibDependency will add an rlib dependency, rewriting to the snapshot library if available.
|
||||||
func addRlibDependency(actx android.BottomUpMutatorContext, lib string, mod *Module, snapshotInfo *cc.SnapshotInfo, variations []blueprint.Variation) {
|
func addRlibDependency(actx android.BottomUpMutatorContext, lib string, mod *Module, snapshotInfo **cc.SnapshotInfo, variations []blueprint.Variation) {
|
||||||
lib = cc.GetReplaceModuleName(lib, cc.GetSnapshot(mod, &snapshotInfo, actx).Rlibs)
|
lib = cc.GetReplaceModuleName(lib, cc.GetSnapshot(mod, snapshotInfo, actx).Rlibs)
|
||||||
actx.AddVariationDependencies(variations, rlibDepTag, lib)
|
actx.AddVariationDependencies(variations, rlibDepTag, lib)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user