From 3b13b61d9d1ed0c74f7c0a37d67f8b3e3a6edc0b Mon Sep 17 00:00:00 2001 From: Jingwen Chen Date: Mon, 17 Oct 2022 12:14:26 +0000 Subject: [PATCH] Don't rely on TOP+OUT_DIR as the location for OUT_DIR. OUT_DIR may not be in TOP (where the source tree is). Test: presubmits Test: set OUT_DIR=$HOME/out1; m --bazel-mode nothing Fixes: 254022328 Change-Id: I8cf9fe2da3cdc0ba5489dfbe41d9d32f06ace83d --- ui/build/soong.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/build/soong.go b/ui/build/soong.go index 28c6ec937..4ec035435 100644 --- a/ui/build/soong.go +++ b/ui/build/soong.go @@ -404,7 +404,7 @@ func runSoong(ctx Context, config Config) { soongBuildEnv.Set("BAZEL_WORKSPACE", absPath(ctx, ".")) soongBuildEnv.Set("BAZEL_METRICS_DIR", config.BazelMetricsDir()) soongBuildEnv.Set("LOG_DIR", config.LogsDir()) - soongBuildEnv.Set("BAZEL_DEPS_FILE", filepath.Join(os.Getenv("TOP"), config.OutDir(), "tools", "bazel.list")) + soongBuildEnv.Set("BAZEL_DEPS_FILE", absPath(ctx, filepath.Join(config.BazelOutDir(), "bazel.list"))) // For Soong bootstrapping tests if os.Getenv("ALLOW_MISSING_DEPENDENCIES") == "true" {