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

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

Fix DepsInSameApex for some dependencies of static libraries

The implementation before libraryDependencyTag was added failed to
treat shared library dependencies with reexported headers on a
static library as crossing the apex boundary because the dependency
tag was overwritten from SharedFromStaticDepTag to sharedExportDepTag,
causing FromStatic to be false.

Bug: 162437057
Test: m checkbuild
Change-Id: I514b90aeb0f1477045e92b46d17336d4fb2fb62c
parent 370173e0
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -2989,9 +2989,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.