Support filegroups
filegroup is a module that contains a list of files, and can be used to export files across package boundaries. filegroups (and genrules) can be referenced from srcs properties of other modules using the syntax ":module". Test: m -j Change-Id: I3d6fc4819c0b4225b474e0ad42f0d947f55a5961
This commit is contained in:
2
cc/cc.go
2
cc/cc.go
@@ -833,7 +833,7 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps {
|
||||
cc, _ := m.(*Module)
|
||||
if cc == nil {
|
||||
switch tag {
|
||||
case android.DefaultsDepTag:
|
||||
case android.DefaultsDepTag, android.SourceDepTag:
|
||||
case genSourceDepTag:
|
||||
if genRule, ok := m.(genrule.SourceFileGenerator); ok {
|
||||
depPaths.GeneratedSources = append(depPaths.GeneratedSources,
|
||||
|
@@ -29,6 +29,8 @@ import (
|
||||
|
||||
type BaseCompilerProperties struct {
|
||||
// list of source files used to compile the C/C++ module. May be .c, .cpp, or .S files.
|
||||
// srcs may reference the outputs of other modules that produce source files like genrule
|
||||
// or filegroup using the syntax ":module".
|
||||
Srcs []string `android:"arch_variant"`
|
||||
|
||||
// list of source files that should not be used to build the C/C++ module.
|
||||
@@ -133,6 +135,8 @@ func (compiler *baseCompiler) compilerDeps(ctx DepsContext, deps Deps) Deps {
|
||||
deps.GeneratedSources = append(deps.GeneratedSources, compiler.Properties.Generated_sources...)
|
||||
deps.GeneratedHeaders = append(deps.GeneratedHeaders, compiler.Properties.Generated_headers...)
|
||||
|
||||
android.ExtractSourcesDeps(ctx, compiler.Properties.Srcs)
|
||||
|
||||
if compiler.hasSrcExt(".proto") {
|
||||
deps = protoDeps(ctx, deps, &compiler.Proto)
|
||||
}
|
||||
|
Reference in New Issue
Block a user