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

Commit d5954023 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes I514b90ae,Ie477de70

* changes:
  Fix DepsInSameApex for some dependencies of static libraries
  Expose all shared and header libraries to Make
parents 5d942d05 aac3222c
Loading
Loading
Loading
Loading
+5 −16
Original line number Diff line number Diff line
@@ -2601,12 +2601,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) {
@@ -2621,13 +2617,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():
@@ -2959,9 +2950,7 @@ func (c *Module) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Modu
				return false
			}
		}
		// TODO(ccross): The libDepTag.reexportFlags is there to maintain previous behavior
		//   when adding libraryDependencyTag and should be removed.
		if isLibDepTag && c.static() && libDepTag.shared() && !libDepTag.reexportFlags {
		if isLibDepTag && c.static() && libDepTag.shared() {
			// shared_lib dependency from a static lib is considered as crossing
			// the APEX boundary because the dependency doesn't actually is
			// linked; the dependency is used only during the compilation phase.