Add support for genrule
Add genrule, which uses a host executable (possibly built by the build system) to generate a single source file. This differs slightly from gensrcs, which takes a list of sources and translates them through a host executable to individual source files. Change-Id: I94bda62c4c53fb3f3817def190e6a7561508d297
This commit is contained in:
10
cc/cc.go
10
cc/cc.go
@@ -1202,6 +1202,7 @@ var _ ccObjectProvider = (*ccObject)(nil)
|
||||
type CCBinary struct {
|
||||
CCLinked
|
||||
out string
|
||||
installFile string
|
||||
BinaryProperties struct {
|
||||
// static_executable: compile executable with -static
|
||||
Static_executable bool
|
||||
@@ -1349,7 +1350,14 @@ func (c *CCBinary) compileModule(ctx common.AndroidModuleContext,
|
||||
}
|
||||
|
||||
func (c *CCBinary) installModule(ctx common.AndroidModuleContext, flags CCFlags) {
|
||||
ctx.InstallFile(filepath.Join("bin", c.Properties.Relative_install_path), c.out)
|
||||
c.installFile = ctx.InstallFile(filepath.Join("bin", c.Properties.Relative_install_path), c.out)
|
||||
}
|
||||
|
||||
func (c *CCBinary) HostToolPath() string {
|
||||
if c.HostOrDevice().Host() {
|
||||
return c.installFile
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type CCTest struct {
|
||||
|
Reference in New Issue
Block a user