Fix exported include dirs
Exported include dirs were only being copied to the build flags in ccDynamic. Move the copy to after collectDeps is run so it picks up the extra includes from all the overriden functions. Also check exported include dirs of shared library dependencies of static libraries. Change-Id: Idb94277f88bbb10869e72011113df57f586274de
This commit is contained in:
9
cc/cc.go
9
cc/cc.go
@@ -313,6 +313,8 @@ func (c *ccBase) GenerateAndroidBuildActions(ctx common.AndroidModuleContext) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
flags.includeDirs = append(flags.includeDirs, deps.includeDirs...)
|
||||||
|
|
||||||
objFiles := c.compileObjs(ctx, flags, deps)
|
objFiles := c.compileObjs(ctx, flags, deps)
|
||||||
if ctx.Failed() {
|
if ctx.Failed() {
|
||||||
return
|
return
|
||||||
@@ -798,8 +800,6 @@ func (c *ccDynamic) collectDeps(ctx common.AndroidModuleContext, flags ccFlags)
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
flags.includeDirs = append(flags.includeDirs, deps.includeDirs...)
|
|
||||||
|
|
||||||
return deps, flags
|
return deps, flags
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -877,6 +877,11 @@ func (c *ccLibrary) collectDeps(ctx common.AndroidModuleContext, flags ccFlags)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Collect exported includes from shared lib dependencies
|
||||||
|
sharedLibNames := c.properties.Shared_libs
|
||||||
|
_, _, newIncludeDirs := c.collectDepsFromList(ctx, sharedLibNames)
|
||||||
|
deps.includeDirs = append(deps.includeDirs, newIncludeDirs...)
|
||||||
|
|
||||||
return deps, flags
|
return deps, flags
|
||||||
} else if c.libraryProperties.IsShared {
|
} else if c.libraryProperties.IsShared {
|
||||||
return c.ccDynamic.collectDeps(ctx, flags)
|
return c.ccDynamic.collectDeps(ctx, flags)
|
||||||
|
Reference in New Issue
Block a user