Merge "Support turning phony warnings into errors"
am: 15d7f26c4e
Change-Id: I9b7ac9be19dabe6f88a20dbb6aa8a6ca8b9f64b1
This commit is contained in:
commit
76237d2df1
3 changed files with 20 additions and 3 deletions
|
@ -50,8 +50,10 @@ type configImpl struct {
|
|||
targetDevice string
|
||||
targetDeviceDir string
|
||||
|
||||
pdkBuild bool
|
||||
brokenDupRules bool
|
||||
pdkBuild bool
|
||||
|
||||
brokenDupRules bool
|
||||
brokenPhonyTargets bool
|
||||
|
||||
pathReplaced bool
|
||||
}
|
||||
|
@ -577,6 +579,14 @@ func (c *configImpl) BuildBrokenDupRules() bool {
|
|||
return c.brokenDupRules
|
||||
}
|
||||
|
||||
func (c *configImpl) SetBuildBrokenPhonyTargets(val bool) {
|
||||
c.brokenPhonyTargets = val
|
||||
}
|
||||
|
||||
func (c *configImpl) BuildBrokenPhonyTargets() bool {
|
||||
return c.brokenPhonyTargets
|
||||
}
|
||||
|
||||
func (c *configImpl) SetTargetDeviceDir(dir string) {
|
||||
c.targetDeviceDir = dir
|
||||
}
|
||||
|
|
|
@ -165,10 +165,12 @@ func runMakeProductConfig(ctx Context, config Config) {
|
|||
// Whether --werror_overriding_commands will work
|
||||
"BUILD_BROKEN_DUP_RULES",
|
||||
|
||||
// Used to turn on --werror_ options in Kati
|
||||
"BUILD_BROKEN_PHONY_TARGETS",
|
||||
|
||||
// Not used, but useful to be in the soong.log
|
||||
"BUILD_BROKEN_ANDROIDMK_EXPORTS",
|
||||
"BUILD_BROKEN_DUP_COPY_HEADERS",
|
||||
"BUILD_BROKEN_PHONY_TARGETS",
|
||||
}, exportEnvVars...), BannerVars...)
|
||||
|
||||
make_vars, err := dumpMakeVars(ctx, config, config.Arguments(), allVars, true)
|
||||
|
@ -196,4 +198,5 @@ func runMakeProductConfig(ctx Context, config Config) {
|
|||
|
||||
config.SetPdkBuild(make_vars["TARGET_BUILD_PDK"] == "true")
|
||||
config.SetBuildBrokenDupRules(make_vars["BUILD_BROKEN_DUP_RULES"] == "true")
|
||||
config.SetBuildBrokenPhonyTargets(make_vars["BUILD_BROKEN_PHONY_TARGETS"] != "false")
|
||||
}
|
||||
|
|
|
@ -93,6 +93,10 @@ func runKati(ctx Context, config Config) {
|
|||
args = append(args, "--werror_overriding_commands")
|
||||
}
|
||||
|
||||
if !config.BuildBrokenPhonyTargets() {
|
||||
args = append(args, "--werror_real_to_phony", "--werror_phony_looks_real")
|
||||
}
|
||||
|
||||
if !config.Environment().IsFalse("KATI_EMULATE_FIND") {
|
||||
args = append(args, "--use_find_emulator")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue