aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2018-07-05 21:46:51 -0700
committerDan Willemsen <dwillemsen@google.com>2018-07-06 12:48:01 -0700
commit5af1cbe776a8a8c8c3bc0fcf8eaab77925062457 (patch)
treee0f2e7b1e540bdeb28e5feb44ce539d05b364251
parent878c66260269562581ad1f397a441c5d87cdee1e (diff)
downloadbuild_soong-5af1cbe776a8a8c8c3bc0fcf8eaab77925062457.tar.gz
build_soong-5af1cbe776a8a8c8c3bc0fcf8eaab77925062457.tar.bz2
build_soong-5af1cbe776a8a8c8c3bc0fcf8eaab77925062457.zip
Ensure bpglob is built early
This matches the change to blueprint's blueprint_impl.bash: https://github.com/google/blueprint/pull/213 It allows us to run bpglob during the two bootstrap phases, so we're never running minibp or the primary builder in a later phase than normal. Also removes the dependency on out/soong/build.ninja from the main phase, since it's never generated by the main phase anymore, and is tripping the dangling dependency checks. Bug: 73646380 Test: m nothing Test: rm frameworks/base/core/java/android/content/pm/dex/ArtManager.java Test: m nothing (soong re-runs) Change-Id: Ia3952d015ad6091ad5a841f555acda78c9390e84
-rw-r--r--ui/build/build.go1
-rw-r--r--ui/build/soong.go20
2 files changed, 15 insertions, 6 deletions
diff --git a/ui/build/build.go b/ui/build/build.go
index 66dbf03f..acba2759 100644
--- a/ui/build/build.go
+++ b/ui/build/build.go
@@ -40,7 +40,6 @@ builddir = {{.OutDir}}
{{if .HasKatiSuffix}}include {{.KatiNinjaFile}}
{{end -}}
include {{.SoongNinjaFile}}
-build {{.CombinedNinjaFile}}: phony {{.SoongNinjaFile}}
`))
func createCombinedBuildNinjaFile(ctx Context, config Config) {
diff --git a/ui/build/soong.go b/ui/build/soong.go
index cbb75c76..a73082a4 100644
--- a/ui/build/soong.go
+++ b/ui/build/soong.go
@@ -71,21 +71,31 @@ func runSoong(ctx Context, config Config) {
}
}()
+ var cfg microfactory.Config
+ cfg.Map("github.com/google/blueprint", "build/blueprint")
+
+ cfg.TrimPath = absPath(ctx, ".")
+
func() {
ctx.BeginTrace("minibp")
defer ctx.EndTrace()
- var cfg microfactory.Config
- cfg.Map("github.com/google/blueprint", "build/blueprint")
-
- cfg.TrimPath = absPath(ctx, ".")
-
minibp := filepath.Join(config.SoongOutDir(), ".minibootstrap/minibp")
if _, err := microfactory.Build(&cfg, minibp, "github.com/google/blueprint/bootstrap/minibp"); err != nil {
ctx.Fatalln("Failed to build minibp:", err)
}
}()
+ func() {
+ ctx.BeginTrace("bpglob")
+ defer ctx.EndTrace()
+
+ bpglob := filepath.Join(config.SoongOutDir(), ".minibootstrap/bpglob")
+ if _, err := microfactory.Build(&cfg, bpglob, "github.com/google/blueprint/bootstrap/bpglob"); err != nil {
+ ctx.Fatalln("Failed to build bpglob:", err)
+ }
+ }()
+
ninja := func(name, file string) {
ctx.BeginTrace(name)
defer ctx.EndTrace()