Merge changes from topic "ndk_libandroid_support_late_static_libs"

* changes:
  Use LateStaticLibs for ndk_libandroid_support
  Move LateStaticLibs after SharedLibs in the dependency include order
  Test include directory ordering
This commit is contained in:
Colin Cross
2021-06-16 21:54:37 +00:00
committed by Gerrit Code Review
4 changed files with 172 additions and 12 deletions

View File

@@ -2193,13 +2193,6 @@ func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) {
}, depTag, RewriteSnapshotLib(staticUnwinder(actx), GetSnapshot(c, &snapshotInfo, actx).StaticLibs))
}
for _, lib := range deps.LateStaticLibs {
depTag := libraryDependencyTag{Kind: staticLibraryDependency, Order: lateLibraryDependency}
actx.AddVariationDependencies([]blueprint.Variation{
{Mutator: "link", Variation: "static"},
}, depTag, RewriteSnapshotLib(lib, GetSnapshot(c, &snapshotInfo, actx).StaticLibs))
}
// shared lib names without the #version suffix
var sharedLibNames []string
@@ -2225,6 +2218,13 @@ func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) {
AddSharedLibDependenciesWithVersions(ctx, c, variations, depTag, name, version, false)
}
for _, lib := range deps.LateStaticLibs {
depTag := libraryDependencyTag{Kind: staticLibraryDependency, Order: lateLibraryDependency}
actx.AddVariationDependencies([]blueprint.Variation{
{Mutator: "link", Variation: "static"},
}, depTag, RewriteSnapshotLib(lib, GetSnapshot(c, &snapshotInfo, actx).StaticLibs))
}
for _, lib := range deps.LateSharedLibs {
if inList(lib, sharedLibNames) {
// This is to handle the case that some of the late shared libs (libc, libdl, libm, ...)