aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/cleanup.go
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2015-07-22 17:06:06 -0700
committerDan Willemsen <dwillemsen@google.com>2015-07-29 17:14:00 -0700
commitefd2de734d972764764be5ca950882b40eb182e4 (patch)
treead6f8364ce9baa1e68e691abf11fec5a68f69b8a /bootstrap/cleanup.go
parent91a657e219aa226df400ac30c0982820912051fa (diff)
downloadandroid_build_blueprint-efd2de734d972764764be5ca950882b40eb182e4.tar.gz
android_build_blueprint-efd2de734d972764764be5ca950882b40eb182e4.tar.bz2
android_build_blueprint-efd2de734d972764764be5ca950882b40eb182e4.zip
Use three stage builds
This splits the current bootstrap stage into two stages: A bootstrap stage, which like today, a reference is checked into the tree. It just builds the "core" blueprint binaries -- minibp, gotestmain, and choosestage. Just enough to build the next stage's ninja file. A primary builder stage. This builds the primary builder, the main ninja file, and any other bootstrap binaries (bpfmt, etc). The main advantage here is that the checked in file really only contains references to blueprint -- not the primary builder. This will allow us to make the primary builder more dynamic, by loading more module types that may or may not exist in all trees. It's even possible to reuse the build.ninja.in in the blueprint repo directly now. We don't currently do that, since we still want to turn on tests. Change-Id: I18683891ed7348b0d7af93084e3a68a04fbd5dbc
Diffstat (limited to 'bootstrap/cleanup.go')
-rw-r--r--bootstrap/cleanup.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/bootstrap/cleanup.go b/bootstrap/cleanup.go
index ba9fd48..dd698f4 100644
--- a/bootstrap/cleanup.go
+++ b/bootstrap/cleanup.go
@@ -33,7 +33,10 @@ func removeAbandonedFiles(ctx *blueprint.Context, config *Config,
srcDir, manifestFile string) error {
buildDir := "."
- if config.stage == StageBootstrap {
+ switch config.stage {
+ case StageBootstrap:
+ buildDir = miniBootstrapDir
+ case StagePrimary:
buildDir = bootstrapDir
}