Enable genrule modules for Rust host binaries am: 5c4e48956c

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1312955

Change-Id: I0d4f450d6d8285ca0b4825731f90efacdbcede37
This commit is contained in:
Chih-Hung Hsieh 2020-07-01 05:21:11 +00:00 committed by Automerger Merge Worker
commit fa9d1304b8

View file

@ -886,6 +886,18 @@ func (mod *Module) Name() string {
return name
}
var _ android.HostToolProvider = (*Module)(nil)
func (mod *Module) HostToolPath() android.OptionalPath {
if !mod.Host() {
return android.OptionalPath{}
}
if _, ok := mod.compiler.(*binaryDecorator); ok {
return mod.outputFile
}
return android.OptionalPath{}
}
var Bool = proptools.Bool
var BoolDefault = proptools.BoolDefault
var String = proptools.String