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
This commit is contained in:
Dan Willemsen 2017-07-24 15:58:20 -07:00
parent 91f9b54767
commit 05f17764c3
2 changed files with 1 additions and 2 deletions

View File

@ -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) {

View File

@ -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()