Turn implicit rules into warnings

Test: build_test in downstream branches
Change-Id: I853e3fa11793cc76ad568b74f7dc31c3d1c5582b
This commit is contained in:
Dan Willemsen 2018-06-15 21:54:47 -07:00
parent f89db951e5
commit fa42f3c10d
3 changed files with 15 additions and 0 deletions

View file

@ -50,6 +50,7 @@ type configImpl struct {
targetDevice string
targetDeviceDir string
pdkBuild bool
brokenDupRules bool
pathReplaced bool
@ -579,3 +580,11 @@ func (c *configImpl) SetTargetDeviceDir(dir string) {
func (c *configImpl) TargetDeviceDir() string {
return c.targetDeviceDir
}
func (c *configImpl) SetPdkBuild(pdk bool) {
c.pdkBuild = pdk
}
func (c *configImpl) IsPdkBuild() bool {
return c.pdkBuild
}

View file

@ -187,5 +187,6 @@ func runMakeProductConfig(ctx Context, config Config) {
config.SetTargetDevice(make_vars["TARGET_DEVICE"])
config.SetTargetDeviceDir(make_vars["TARGET_DEVICE_DIR"])
config.SetPdkBuild(make_vars["TARGET_BUILD_PDK"] == "true")
config.SetBuildBrokenDupRules(make_vars["BUILD_BROKEN_DUP_RULES"] != "false")
}

View file

@ -83,6 +83,11 @@ func runKati(ctx Context, config Config) {
"-f", "build/make/core/main.mk",
}
// PDK builds still uses a few implicit rules
if !config.IsPdkBuild() {
args = append(args, "--warn_implicit_rules")
}
if !config.BuildBrokenDupRules() {
args = append(args, "--werror_overriding_commands")
}