From 6097746769bcc02cd354a47c2901d28e8de5e120 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Thu, 18 Apr 2019 09:40:15 -0700 Subject: [PATCH] Obsolete BUILD_BROKEN_PHONY_TARGETS There are no remaining users. Also mark BUILD_BROKEN_ANDROIDMK_EXPORTS and BUILD_BROKEN_ENG_DEBUG_TAGS as deprecated in scripts/build_broken_logs.go Test: treehugger Change-Id: If7892bef1b9001f12a99565f886b395cf1985e70 --- scripts/build_broken_logs.go | 13 ++----------- ui/build/config.go | 13 ++----------- ui/build/dumpvars.go | 4 ---- ui/build/kati.go | 16 +++------------- 4 files changed, 7 insertions(+), 39 deletions(-) diff --git a/scripts/build_broken_logs.go b/scripts/build_broken_logs.go index f081f262d..789afad17 100644 --- a/scripts/build_broken_logs.go +++ b/scripts/build_broken_logs.go @@ -71,21 +71,12 @@ var buildBrokenSettings = []struct { }, { name: "BUILD_BROKEN_ANDROIDMK_EXPORTS", - behavior: DefaultFalse, + behavior: DefaultDeprecated, warnings: []string{"export_keyword"}, }, - { - name: "BUILD_BROKEN_PHONY_TARGETS", - behavior: DefaultFalse, - warnings: []string{ - "depends on PHONY target", - "looks like a real file", - "writing to readonly directory", - }, - }, { name: "BUILD_BROKEN_ENG_DEBUG_TAGS", - behavior: DefaultTrue, + behavior: DefaultDeprecated, warnings: []string{ "Changes.md#LOCAL_MODULE_TAGS", }, diff --git a/ui/build/config.go b/ui/build/config.go index 7eb3a7252..c298f0008 100644 --- a/ui/build/config.go +++ b/ui/build/config.go @@ -53,9 +53,8 @@ type configImpl struct { pdkBuild bool - brokenDupRules bool - brokenPhonyTargets bool - brokenUsesNetwork bool + brokenDupRules bool + brokenUsesNetwork bool pathReplaced bool } @@ -615,14 +614,6 @@ 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) SetBuildBrokenUsesNetwork(val bool) { c.brokenUsesNetwork = val } diff --git a/ui/build/dumpvars.go b/ui/build/dumpvars.go index 7f3426ad4..8f6e81ecd 100644 --- a/ui/build/dumpvars.go +++ b/ui/build/dumpvars.go @@ -200,9 +200,6 @@ 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", - // Whether to enable the network during the build "BUILD_BROKEN_USES_NETWORK", @@ -276,6 +273,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"] == "true") config.SetBuildBrokenUsesNetwork(make_vars["BUILD_BROKEN_USES_NETWORK"] == "true") } diff --git a/ui/build/kati.go b/ui/build/kati.go index 959d0bdf4..5ad966a29 100644 --- a/ui/build/kati.go +++ b/ui/build/kati.go @@ -81,6 +81,9 @@ func runKati(ctx Context, config Config, extraSuffix string, args []string, envF "--werror_suffix_rules", "--warn_real_to_phony", "--warn_phony_looks_real", + "--werror_real_to_phony", + "--werror_phony_looks_real", + "--werror_writable", "--top_level_phony", "--kati_stats", }, args...) @@ -138,13 +141,6 @@ func runKatiBuild(ctx Context, config Config) { args = append(args, "--werror_overriding_commands") } - if !config.BuildBrokenPhonyTargets() { - args = append(args, - "--werror_real_to_phony", - "--werror_phony_looks_real", - "--werror_writable") - } - args = append(args, config.KatiArgs()...) args = append(args, @@ -162,11 +158,8 @@ func runKatiPackage(ctx Context, config Config) { args := []string{ "--writable", config.DistDir() + "/", - "--werror_writable", "--werror_implicit_rules", "--werror_overriding_commands", - "--werror_real_to_phony", - "--werror_phony_looks_real", "-f", "build/make/packaging/main.mk", "KATI_PACKAGE_MK_DIR=" + config.KatiPackageMkDir(), } @@ -202,11 +195,8 @@ func runKatiCleanSpec(ctx Context, config Config) { defer ctx.EndTrace() runKati(ctx, config, katiCleanspecSuffix, []string{ - "--werror_writable", "--werror_implicit_rules", "--werror_overriding_commands", - "--werror_real_to_phony", - "--werror_phony_looks_real", "-f", "build/make/core/cleanbuild.mk", "SOONG_MAKEVARS_MK=" + config.SoongMakeVarsMk(), "TARGET_DEVICE_DIR=" + config.TargetDeviceDir(),