From 379d2cb5117025772d9e7a2e73fbba542bf67f4f Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 5 Dec 2016 17:11:06 -0800 Subject: [PATCH] Always check tidy properties To avoid build breakages when WITH_TIDY=1 is set, check for bad tidy properties before checking if tidy is enabled. Test: mmma -j external/llvm with a tidy error Test: m -j Change-Id: Ia338c417091ff6b03909bbac8b26febed5b6d6ea --- cc/tidy.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cc/tidy.go b/cc/tidy.go index 68380ec70..2216f5873 100644 --- a/cc/tidy.go +++ b/cc/tidy.go @@ -49,6 +49,9 @@ func (tidy *tidyFeature) deps(ctx BaseModuleContext, deps Deps) Deps { } func (tidy *tidyFeature) flags(ctx ModuleContext, flags Flags) Flags { + CheckBadTidyFlags(ctx, "tidy_flags", tidy.Properties.Tidy_flags) + CheckBadTidyChecks(ctx, "tidy_checks", tidy.Properties.Tidy_checks) + // Check if tidy is explicitly disabled for this module if tidy.Properties.Tidy != nil && !*tidy.Properties.Tidy { return flags @@ -66,8 +69,6 @@ func (tidy *tidyFeature) flags(ctx ModuleContext, flags Flags) Flags { flags.Tidy = true - CheckBadTidyFlags(ctx, "tidy_flags", tidy.Properties.Tidy_flags) - esc := proptools.NinjaAndShellEscape flags.TidyFlags = append(flags.TidyFlags, esc(tidy.Properties.Tidy_flags)...) @@ -83,8 +84,6 @@ func (tidy *tidyFeature) flags(ctx ModuleContext, flags Flags) Flags { tidyChecks += config.TidyChecksForDir(ctx.ModuleDir()) } if len(tidy.Properties.Tidy_checks) > 0 { - CheckBadTidyChecks(ctx, "tidy_checks", tidy.Properties.Tidy_checks) - tidyChecks = tidyChecks + "," + strings.Join(esc(tidy.Properties.Tidy_checks), ",") } flags.TidyFlags = append(flags.TidyFlags, tidyChecks)