From 05f17764c39531bcbf2992ff12cb1cf36a609eab Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Mon, 24 Jul 2017 15:58:20 -0700 Subject: [PATCH] Use a unified ninja builddir Instead of calling SetNinjaBuildDir, pass it to bootstrap.bash, so that the bootstrap package can set it consistently during bootstrapping and normal execution. Bug: 63720725 Test: m -j nothing Test: mkdir o; ../bootstrap.bash; ./soong Change-Id: Ica88d2d5f1461b5be49bfe6316c6ec4ef4d89d49 --- android/androidmk.go | 2 -- ui/build/soong.go | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/android/androidmk.go b/android/androidmk.go index dabefcca4..6197f5974 100644 --- a/android/androidmk.go +++ b/android/androidmk.go @@ -61,8 +61,6 @@ func (c *androidMkSingleton) GenerateBuildActions(ctx blueprint.SingletonContext return } - ctx.SetNinjaBuildDir(pctx, filepath.Join(config.buildDir, "..")) - var androidMkModulesList []Module ctx.VisitAllModules(func(module blueprint.Module) { diff --git a/ui/build/soong.go b/ui/build/soong.go index ddfe666ce..d242805ed 100644 --- a/ui/build/soong.go +++ b/ui/build/soong.go @@ -24,6 +24,7 @@ func runSoongBootstrap(ctx Context, config Config) { cmd := Command(ctx, config, "soong bootstrap", "./bootstrap.bash") cmd.Environment.Set("BUILDDIR", config.SoongOutDir()) + cmd.Environment.Set("NINJA_BUILDDIR", config.OutDir()) cmd.Sandbox = soongSandbox cmd.Stdout = ctx.Stdout() cmd.Stderr = ctx.Stderr()