Merge changes from topic "apex_available" am: 1fd192302c
am: f64951518d
Change-Id: Iae64e583e4ae3470da681a8ab4848a0f662bb602
This commit is contained in:
19
cc/cc.go
19
cc/cc.go
@@ -1780,6 +1780,9 @@ func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) {
|
||||
|
||||
for _, lib := range deps.SharedLibs {
|
||||
depTag := SharedDepTag
|
||||
if c.static() {
|
||||
depTag = SharedFromStaticDepTag
|
||||
}
|
||||
if inList(lib, deps.ReexportSharedLibHeaders) {
|
||||
depTag = sharedExportDepTag
|
||||
}
|
||||
@@ -2197,7 +2200,7 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps {
|
||||
depFile := android.OptionalPath{}
|
||||
|
||||
switch depTag {
|
||||
case ndkStubDepTag, SharedDepTag, sharedExportDepTag:
|
||||
case ndkStubDepTag, SharedDepTag, SharedFromStaticDepTag, sharedExportDepTag:
|
||||
ptr = &depPaths.SharedLibs
|
||||
depPtr = &depPaths.SharedLibsDeps
|
||||
depFile = ccDep.Toc()
|
||||
@@ -2550,9 +2553,17 @@ func (c *Module) AndroidMkWriteAdditionalDependenciesForSourceAbiDiff(w io.Write
|
||||
|
||||
func (c *Module) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Module) bool {
|
||||
if depTag, ok := ctx.OtherModuleDependencyTag(dep).(DependencyTag); ok {
|
||||
if cc, ok := dep.(*Module); ok && cc.HasStubsVariants() && depTag.Shared && depTag.Library {
|
||||
// dynamic dep to a stubs lib crosses APEX boundary
|
||||
return false
|
||||
if cc, ok := dep.(*Module); ok {
|
||||
if cc.HasStubsVariants() && depTag.Shared && depTag.Library {
|
||||
// dynamic dep to a stubs lib crosses APEX boundary
|
||||
return false
|
||||
}
|
||||
if depTag.FromStatic {
|
||||
// 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.
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
|
@@ -67,12 +67,17 @@ type DependencyTag struct {
|
||||
ReexportFlags bool
|
||||
|
||||
ExplicitlyVersioned bool
|
||||
|
||||
FromStatic bool
|
||||
}
|
||||
|
||||
var (
|
||||
SharedDepTag = DependencyTag{Name: "shared", Library: true, Shared: true}
|
||||
StaticDepTag = DependencyTag{Name: "static", Library: true}
|
||||
|
||||
// Same as SharedDepTag, but from a static lib
|
||||
SharedFromStaticDepTag = DependencyTag{Name: "shared from static", Library: true, Shared: true, FromStatic: true}
|
||||
|
||||
CrtBeginDepTag = DependencyTag{Name: "crtbegin"}
|
||||
CrtEndDepTag = DependencyTag{Name: "crtend"}
|
||||
)
|
||||
|
Reference in New Issue
Block a user