Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe9acfec authored by Colin Cross's avatar Colin Cross
Browse files

Move LateStaticLibs after SharedLibs in the dependency include order

LateStaticLibs has always been after StaticLibs, move it after
SharedLibs too so that exported headers from LateStaticLibs
dependencies come after exported headers from SharedLibs dependencies.
This will be used to ensure the ndk_libandroid_support headers come
after the ndk_libc++_shared headers.

Test: m checkbuild
Change-Id: I5ef180c99cefcd823c6970c06d0e772a10fa0456
parent ae62818d
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -2180,13 +2180,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

@@ -2212,6 +2205,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, ...)