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

Commit 370173e0 authored by Colin Cross's avatar Colin Cross
Browse files

Expose all shared and header libraries to Make

The implementation before libraryDependencyTag was added failed to
expose some shared or header libraries because it didn't handle the
headerExportDepTag or SharedFromStaticDepTag tags.

Bug: 162437057
Test: m checkbuild
Change-Id: Ie477de70faa31cca8afaa753ea1c0c39586858c7
parent 6e511a9a
Loading
Loading
Loading
Loading
+4 −13
Original line number Diff line number Diff line
@@ -2640,12 +2640,8 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps {
			makeLibName := c.makeLibName(ctx, ccDep, depName) + libDepTag.makeSuffix
			switch {
			case libDepTag.header():
				// TODO(ccross): The reexportFlags check is there to maintain previous
				//   behavior when adding libraryDependencyTag and should be removed.
				if !libDepTag.reexportFlags {
				c.Properties.AndroidMkHeaderLibs = append(
					c.Properties.AndroidMkHeaderLibs, makeLibName)
				}
			case libDepTag.shared():
				if ccDep.CcLibrary() {
					if ccDep.BuildStubs() && android.InAnyApex(depName) {
@@ -2660,13 +2656,8 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps {

				// Note: the order of libs in this list is not important because
				// they merely serve as Make dependencies and do not affect this lib itself.
				// TODO(ccross): The reexportFlags, order and ndk checks are there to
				//   maintain previous behavior when adding libraryDependencyTag and
				//   should be removed.
				if !c.static() || libDepTag.reexportFlags || libDepTag.Order == lateLibraryDependency || libDepTag.ndk {
				c.Properties.AndroidMkSharedLibs = append(
					c.Properties.AndroidMkSharedLibs, makeLibName)
				}
				// Record baseLibName for snapshots.
				c.Properties.SnapshotSharedLibs = append(c.Properties.SnapshotSharedLibs, baseLibName(depName))
			case libDepTag.static():