Fix RBE tmp dir
The RBE tmp dir holds all the re-client logs and socket files. Currently, it is being created as the `out/soong/.temp/` dir, which is auto deleted by Soong. This is causing problems because while a build is running, user cannot open a second terminal and run `lunch`. This CL fixes the issue by creating the RBE tmp dir in the `out/soong/rbe/` directory. The next RBE build will clean this folder. Bug: 349664018 Change-Id: Ib238e48f5b19755b016263b45f02b1be3e8efb35
This commit is contained in:
@@ -1341,8 +1341,7 @@ func (c *configImpl) rbeDownloadTmpDir() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *configImpl) rbeTmpDir() string {
|
func (c *configImpl) rbeTmpDir() string {
|
||||||
buildTmpDir := shared.TempDirForOutDir(c.SoongOutDir())
|
return filepath.Join(c.SoongOutDir(), "rbe")
|
||||||
return filepath.Join(buildTmpDir, "rbe")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *configImpl) rbeCacheDir() string {
|
func (c *configImpl) rbeCacheDir() string {
|
||||||
|
@@ -65,7 +65,7 @@ func getRBEVars(ctx Context, config Config) map[string]string {
|
|||||||
"RBE_platform": "container-image=" + remoteexec.DefaultImage,
|
"RBE_platform": "container-image=" + remoteexec.DefaultImage,
|
||||||
}
|
}
|
||||||
if config.StartRBE() {
|
if config.StartRBE() {
|
||||||
name, err := config.rbeSockAddr(absPath(ctx, config.TempDir()))
|
name, err := config.rbeSockAddr(absPath(ctx, config.rbeTmpDir()))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.Fatalf("Error retrieving socket address: %v", err)
|
ctx.Fatalf("Error retrieving socket address: %v", err)
|
||||||
return nil
|
return nil
|
||||||
|
Reference in New Issue
Block a user