Merge "Fix rust snapshotInfo provider bug"
This commit is contained in:
@@ -1516,7 +1516,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,
|
||||||
@@ -1527,7 +1527,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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1616,8 +1616,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