Export aidl, proto and sysprop generated headers separately
Previously, a cc library that included .aidl, .proto and/or .sysprop files and exported headers generated from at least one of those types would actually export generated headers from all of them. While headers generated from .sysprop files are always exported those generated from .aidl or .proto should only be exported when explicitly requested. This change treats them separately as expected. It has the potential to break the build as it could reduce the set of headers exported and so a dependent module that needed those would break. The fix in that case is to simply add one (or both) of the following to the module that previously exported those headers: aidl: { export_aidl_headers: true, } proto: { export_proto_headers: true, } Bug: 180712399 Test: m droid Change-Id: I488182e27dd423d261443612f98d5c112dd3ef8f
This commit is contained in:
@@ -230,6 +230,8 @@ type baseCompiler struct {
|
||||
// other modules and filegroups. May include source files that have not yet been translated to
|
||||
// C/C++ (.aidl, .proto, etc.)
|
||||
srcsBeforeGen android.Paths
|
||||
|
||||
generatedSourceInfo
|
||||
}
|
||||
|
||||
var _ compiler = (*baseCompiler)(nil)
|
||||
@@ -634,10 +636,11 @@ func (compiler *baseCompiler) compile(ctx ModuleContext, flags Flags, deps PathD
|
||||
|
||||
srcs := append(android.Paths(nil), compiler.srcsBeforeGen...)
|
||||
|
||||
srcs, genDeps := genSources(ctx, srcs, buildFlags)
|
||||
srcs, genDeps, info := genSources(ctx, srcs, buildFlags)
|
||||
pathDeps = append(pathDeps, genDeps...)
|
||||
|
||||
compiler.pathDeps = pathDeps
|
||||
compiler.generatedSourceInfo = info
|
||||
compiler.cFlagsDeps = flags.CFlagsDeps
|
||||
|
||||
// Save src, buildFlags and context
|
||||
|
Reference in New Issue
Block a user