diff options
author | ThiƩbaud Weksteen <tweek@google.com> | 2020-08-07 13:56:35 +0200 |
---|---|---|
committer | ThiƩbaud Weksteen <tweek@google.com> | 2020-08-07 13:56:35 +0200 |
commit | 4318e1c650b39b48cbe1c121a62408bcd07b086b (patch) | |
tree | 3c8aa7789330bdd44530958ea82b2d2e2b1ecf19 /rust/compiler.go | |
parent | 9bf30424937491f87d61eceb03a84c15f3a6b61a (diff) |
rust: fully disable all lints when no_lint is set
If the no_lint attribute is set, we now explicitly disable any warning
or error.
Bug: 162897623
Test: cd external/selinux; mma; check the build log for warnings
Change-Id: I5338bda77ab25ded7cc43cc3afd29419fcbd9808
Diffstat (limited to 'rust/compiler.go')
-rw-r--r-- | rust/compiler.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/rust/compiler.go b/rust/compiler.go index 0274015c9..c39a4a181 100644 --- a/rust/compiler.go +++ b/rust/compiler.go @@ -159,7 +159,9 @@ func (compiler *baseCompiler) featuresToFlags(features []string) []string { func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags) Flags { - if !Bool(compiler.Properties.No_lint) { + if Bool(compiler.Properties.No_lint) { + flags.RustFlags = append(flags.RustFlags, config.AllowAllLints) + } else { flags.RustFlags = append(flags.RustFlags, config.RustcLintsForDir(ctx.ModuleDir())) } flags.RustFlags = append(flags.RustFlags, compiler.Properties.Flags...) |