diff options
Diffstat (limited to 'ui/build/build.go')
| -rw-r--r-- | ui/build/build.go | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/ui/build/build.go b/ui/build/build.go index 7fea863df..1b40f36f8 100644 --- a/ui/build/build.go +++ b/ui/build/build.go @@ -31,7 +31,7 @@ import ( func SetupOutDir(ctx Context, config Config) { ensureEmptyFileExists(ctx, filepath.Join(config.OutDir(), "Android.mk")) ensureEmptyFileExists(ctx, filepath.Join(config.OutDir(), "CleanSpec.mk")) - ensureEmptyDirectoriesExist(ctx, config.TempDir()) + ensureDirectoriesExist(ctx, config.SoongOutDir()) // The ninja_build file is used by our buildbots to understand that the output // can be parsed as ninja output. @@ -87,6 +87,11 @@ func SetupOutDir(ctx Context, config Config) { writeValueIfChanged(ctx, config, config.SoongOutDir(), "build_hostname.txt", hostname) } +// SetupTempDir makes sure config.TempDir() exists and is empty. +func SetupTempDir(ctx Context, config Config) { + ensureEmptyDirectoriesExist(ctx, config.TempDir()) +} + // SetupKatiEnabledMarker creates or delets a file that tells soong_build if we're running with // kati. func SetupKatiEnabledMarker(ctx Context, config Config) { @@ -300,6 +305,7 @@ func Build(ctx Context, config Config) { checkRAM(ctx, config) SetupOutDir(ctx, config) + SetupTempDir(ctx, config) // checkCaseSensitivity issues a warning if a case-insensitive file system is being used. checkCaseSensitivity(ctx, config) @@ -308,10 +314,6 @@ func Build(ctx Context, config Config) { what := evaluateWhatToRun(config, ctx.Verboseln) - if config.StartGoma() { - startGoma(ctx, config) - } - rbeCh := make(chan bool) var rbePanic any if config.StartRBE() { @@ -329,6 +331,11 @@ func Build(ctx Context, config Config) { close(rbeCh) } + if config.RunCIPDProxyServer() && shouldRunCIPDProxy(config) { + cipdProxy := startCIPDProxyServer(ctx, config) + defer cipdProxy.Stop() + } + if what&RunProductConfig != 0 { runMakeProductConfig(ctx, config) @@ -366,7 +373,7 @@ func Build(ctx Context, config Config) { genKatiSuffix(ctx, config) if what&RunSoong != 0 { - runSoong(ctx, config) + runSoong(ctx, config, what&RunBuildTests != 0) } if what&RunKati != 0 { |
