aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorJaewoong Jung <jungjw@google.com>2021-01-05 16:43:14 -0800
committerJaewoong Jung <jungjw@google.com>2021-01-05 16:47:04 -0800
commit6e49493dac7647c1d078f6a780db0993933fc94d (patch)
treee042189fb74cf45163ba4ca68360aa7324124e66 /ui
parent8bfb63c5a9717ef50e7a10fcd85274b4fcd55df3 (diff)
downloadsoong-6e49493dac7647c1d078f6a780db0993933fc94d.tar.gz
Skip old file cleanup for non-full builds.
There are few build targets that don't generate an installed file list, e.g. product-graph. Skip the old installed file cleanup step so that the func doesn't complain about a lack of the list file. Fixes: 168105598 Test: m product-graph Change-Id: Ib7dce6b801979bb565b74d6355143bac23b84fe6
Diffstat (limited to 'ui')
-rw-r--r--ui/build/config.go9
-rw-r--r--ui/build/dumpvars.go4
-rw-r--r--ui/build/kati.go6
3 files changed, 18 insertions, 1 deletions
diff --git a/ui/build/config.go b/ui/build/config.go
index 1152cd790..15da1bc8c 100644
--- a/ui/build/config.go
+++ b/ui/build/config.go
@@ -56,6 +56,7 @@ type configImpl struct {
katiSuffix string
targetDevice string
targetDeviceDir string
+ fullBuild bool
// Autodetected
totalRAM uint64
@@ -791,6 +792,14 @@ func (c *configImpl) SetTargetDevice(device string) {
c.targetDevice = device
}
+func (c *configImpl) FullBuild() bool {
+ return c.fullBuild
+}
+
+func (c *configImpl) SetFullBuild(fullBuild bool) {
+ c.fullBuild = fullBuild
+}
+
func (c *configImpl) TargetBuildVariant() string {
if v, ok := c.environ.Get("TARGET_BUILD_VARIANT"); ok {
return v
diff --git a/ui/build/dumpvars.go b/ui/build/dumpvars.go
index fe0aca983..be6f00a18 100644
--- a/ui/build/dumpvars.go
+++ b/ui/build/dumpvars.go
@@ -214,6 +214,9 @@ func runMakeProductConfig(ctx Context, config Config) {
// So that later Kati runs can find BoardConfig.mk faster
"TARGET_DEVICE_DIR",
+ // To decide whether to skip the old installed cleanup step.
+ "FULL_BUILD",
+
// Whether --werror_overriding_commands will work
"BUILD_BROKEN_DUP_RULES",
@@ -278,6 +281,7 @@ func runMakeProductConfig(ctx Context, config Config) {
config.SetNinjaArgs(strings.Fields(makeVars["NINJA_GOALS"]))
config.SetTargetDevice(makeVars["TARGET_DEVICE"])
config.SetTargetDeviceDir(makeVars["TARGET_DEVICE_DIR"])
+ config.SetFullBuild(makeVars["FULL_BUILD"] == "true")
config.SetBuildBrokenDupRules(makeVars["BUILD_BROKEN_DUP_RULES"] == "true")
config.SetBuildBrokenUsesNetwork(makeVars["BUILD_BROKEN_USES_NETWORK"] == "true")
diff --git a/ui/build/kati.go b/ui/build/kati.go
index 06ec64607..668b20eed 100644
--- a/ui/build/kati.go
+++ b/ui/build/kati.go
@@ -229,7 +229,11 @@ func runKatiBuild(ctx Context, config Config) {
// Cleanup steps.
cleanCopyHeaders(ctx, config)
- cleanOldInstalledFiles(ctx, config)
+ // Skip the old installed file cleanup step for few non-full build goals as we don't create
+ // an installed file list for them.
+ if config.FullBuild() {
+ cleanOldInstalledFiles(ctx, config)
+ }
}
// Clean out obsolete header files on the disk that were *not copied* during the