Merge "Set download_tmp_dir explicitly to be a directory under the output directory." into main

This commit is contained in:
Ramy Medhat
2023-10-12 01:05:18 +00:00
committed by Gerrit Code Review
2 changed files with 21 additions and 7 deletions

View File

@@ -1349,6 +1349,19 @@ func (c *configImpl) rbeProxyLogsDir() string {
return v
}
}
return c.rbeTmpDir()
}
func (c *configImpl) rbeDownloadTmpDir() string {
for _, f := range []string{"RBE_download_tmp_dir", "FLAG_download_tmp_dir"} {
if v, ok := c.environ.Get(f); ok {
return v
}
}
return c.rbeTmpDir()
}
func (c *configImpl) rbeTmpDir() string {
buildTmpDir := shared.TempDirForOutDir(c.SoongOutDir())
return filepath.Join(buildTmpDir, "rbe")
}

View File

@@ -55,13 +55,14 @@ func rbeCommand(ctx Context, config Config, rbeCmd string) string {
func getRBEVars(ctx Context, config Config) map[string]string {
vars := map[string]string{
"RBE_log_dir": config.rbeProxyLogsDir(),
"RBE_re_proxy": config.rbeReproxy(),
"RBE_exec_root": config.rbeExecRoot(),
"RBE_output_dir": config.rbeProxyLogsDir(),
"RBE_proxy_log_dir": config.rbeProxyLogsDir(),
"RBE_cache_dir": config.rbeCacheDir(),
"RBE_platform": "container-image=" + remoteexec.DefaultImage,
"RBE_log_dir": config.rbeProxyLogsDir(),
"RBE_re_proxy": config.rbeReproxy(),
"RBE_exec_root": config.rbeExecRoot(),
"RBE_output_dir": config.rbeProxyLogsDir(),
"RBE_proxy_log_dir": config.rbeProxyLogsDir(),
"RBE_cache_dir": config.rbeCacheDir(),
"RBE_download_tmp_dir": config.rbeDownloadTmpDir(),
"RBE_platform": "container-image=" + remoteexec.DefaultImage,
}
if config.StartRBE() {
name, err := config.rbeSockAddr(absPath(ctx, config.TempDir()))