Fix: static dependency across an APEX is lost am: 16e91a067d
am: 53cfd00417
Change-Id: I3bf3c9e2c790de063c8670f55482088c55a9f0f4
This commit is contained in:
@@ -51,12 +51,12 @@ type BinaryLinkerProperties struct {
|
||||
}
|
||||
|
||||
func init() {
|
||||
android.RegisterModuleType("cc_binary", binaryFactory)
|
||||
android.RegisterModuleType("cc_binary", BinaryFactory)
|
||||
android.RegisterModuleType("cc_binary_host", binaryHostFactory)
|
||||
}
|
||||
|
||||
// Module factory for binaries
|
||||
func binaryFactory() android.Module {
|
||||
func BinaryFactory() android.Module {
|
||||
module, _ := NewBinary(android.HostAndDeviceSupported)
|
||||
return module.Init()
|
||||
}
|
||||
|
7
cc/cc.go
7
cc/cc.go
@@ -1419,7 +1419,12 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps {
|
||||
}
|
||||
|
||||
if t, ok := depTag.(dependencyTag); ok && t.library {
|
||||
if dependentLibrary, ok := ccDep.linker.(*libraryDecorator); ok {
|
||||
depIsStatic := false
|
||||
switch depTag {
|
||||
case staticDepTag, staticExportDepTag, lateStaticDepTag, wholeStaticDepTag:
|
||||
depIsStatic = true
|
||||
}
|
||||
if dependentLibrary, ok := ccDep.linker.(*libraryDecorator); ok && !depIsStatic {
|
||||
depIsStubs := dependentLibrary.buildStubs()
|
||||
depHasStubs := ccDep.HasStubsVariants()
|
||||
depInSameApex := android.DirectlyInApex(c.ApexName(), depName)
|
||||
|
@@ -53,7 +53,7 @@ func TestMain(m *testing.M) {
|
||||
|
||||
func createTestContext(t *testing.T, config android.Config, bp string) *android.TestContext {
|
||||
ctx := android.NewTestArchContext()
|
||||
ctx.RegisterModuleType("cc_binary", android.ModuleFactoryAdaptor(binaryFactory))
|
||||
ctx.RegisterModuleType("cc_binary", android.ModuleFactoryAdaptor(BinaryFactory))
|
||||
ctx.RegisterModuleType("cc_library", android.ModuleFactoryAdaptor(LibraryFactory))
|
||||
ctx.RegisterModuleType("cc_library_shared", android.ModuleFactoryAdaptor(LibrarySharedFactory))
|
||||
ctx.RegisterModuleType("cc_library_headers", android.ModuleFactoryAdaptor(LibraryHeaderFactory))
|
||||
|
Reference in New Issue
Block a user