[rust] Disable clippy for rust_bindgen modules.

bindgen generated code may not pass clippy checks, so preemptively
disable clippy for these.

Bug: 162828070
Test: clippy is not called when compiling rust_bindgen library variants.
Change-Id: I9632c889417bdfd1adf96d9cfbccbe6340824205
This commit is contained in:
Ivan Lozano 2020-08-04 16:27:16 -04:00
parent 89e4882d37
commit 32267c88c4
2 changed files with 7 additions and 0 deletions

View File

@ -177,6 +177,7 @@ func NewRustBindgen(hod android.HostOrDeviceSupported) (*Module, *bindgenDecorat
module.sourceProvider = bindgen
module.compiler = library
module.setClippy(false)
return module, bindgen
}

View File

@ -1037,6 +1037,12 @@ func (mod *Module) Name() string {
return name
}
func (mod *Module) setClippy(clippy bool) {
if mod.clippy != nil {
mod.clippy.Properties.Clippy = proptools.BoolPtr(clippy)
}
}
var _ android.HostToolProvider = (*Module)(nil)
func (mod *Module) HostToolPath() android.OptionalPath {