Add support for CMakefile generation
Test: Manually generated CMakeLists.txt for gui/ui/aapt2. Change-Id: I7dedc300c1e50b8e39bc58091b650c0bbe2c62da
This commit is contained in:
@@ -123,10 +123,20 @@ type baseCompiler struct {
|
||||
Properties BaseCompilerProperties
|
||||
Proto ProtoProperties
|
||||
deps android.Paths
|
||||
srcs android.Paths
|
||||
flags builderFlags
|
||||
}
|
||||
|
||||
var _ compiler = (*baseCompiler)(nil)
|
||||
|
||||
type CompiledInterface interface {
|
||||
Srcs() android.Paths
|
||||
}
|
||||
|
||||
func (compiler *baseCompiler) Srcs() android.Paths {
|
||||
return compiler.srcs
|
||||
}
|
||||
|
||||
func (compiler *baseCompiler) appendCflags(flags []string) {
|
||||
compiler.Properties.Cflags = append(compiler.Properties.Cflags, flags...)
|
||||
}
|
||||
@@ -429,6 +439,9 @@ func (compiler *baseCompiler) compile(ctx ModuleContext, flags Flags, deps PathD
|
||||
|
||||
compiler.deps = pathDeps
|
||||
|
||||
// Save src, buildFlags and context
|
||||
compiler.srcs = srcs
|
||||
|
||||
// Compile files listed in c.Properties.Srcs into objects
|
||||
objs := compileObjs(ctx, buildFlags, "", srcs, compiler.deps)
|
||||
|
||||
|
Reference in New Issue
Block a user