Revert "Revert "Test for dangling rules in make checkbuild""
This reverts commit fb941913a351eca744e8da8251b191a05bccc3a1.
Reapplies I4933187e8b72f2ef0c32d18ffea756e2c6fa417c with fixes
to disable the check for mac builds, where many modules are
disabled and the check is just going to cause more problems.
Test: m checkbuild
Change-Id: If6712c90ececd5d015fcdcdeefe0c3d4f5590711
diff --git a/ui/build/config.go b/ui/build/config.go
index 6e5559d..df97d80 100644
--- a/ui/build/config.go
+++ b/ui/build/config.go
@@ -34,11 +34,12 @@
environ *Environment
// From the arguments
- parallel int
- keepGoing int
- verbose bool
- dist bool
- skipMake bool
+ parallel int
+ keepGoing int
+ verbose bool
+ checkbuild bool
+ dist bool
+ skipMake bool
// From the product config
katiArgs []string
@@ -206,6 +207,8 @@
} else {
if arg == "dist" {
c.dist = true
+ } else if arg == "checkbuild" {
+ c.checkbuild = true
}
c.arguments = append(c.arguments, arg)
}
@@ -313,6 +316,12 @@
panic("SetKatiSuffix has not been called")
}
+// Checkbuild returns true if "checkbuild" was one of the build goals, which means that the
+// user is interested in additional checks at the expense of build time.
+func (c *configImpl) Checkbuild() bool {
+ return c.checkbuild
+}
+
func (c *configImpl) Dist() bool {
return c.dist
}