diff options
Diffstat (limited to 'android/bazel_handler.go')
-rw-r--r-- | android/bazel_handler.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/android/bazel_handler.go b/android/bazel_handler.go index 312f00919..40a5a7378 100644 --- a/android/bazel_handler.go +++ b/android/bazel_handler.go @@ -106,7 +106,7 @@ type bazelPaths struct { bazelPath string outputBase string workspaceDir string - buildDir string + soongOutDir string metricsDir string } @@ -254,7 +254,7 @@ func NewBazelContext(c *config) (BazelContext, error) { func bazelPathsFromConfig(c *config) (*bazelPaths, error) { p := bazelPaths{ - buildDir: c.buildDir, + soongOutDir: c.soongOutDir, } missingEnvVars := []string{} if len(c.Getenv("BAZEL_HOME")) > 1 { @@ -382,7 +382,7 @@ func (r *builtinBazelRunner) issueBazelCommand(paths *bazelPaths, runName bazel. bazelCmd.Env = append(os.Environ(), "HOME="+paths.homeDir, pwdPrefix(), - "BUILD_DIR="+absolutePath(paths.buildDir), + "BUILD_DIR="+absolutePath(paths.soongOutDir), // Make OUT_DIR absolute here so tools/bazel.sh uses the correct // OUT_DIR at <root>/out, instead of <root>/out/soong/workspace/out. "OUT_DIR="+absolutePath(paths.outDir()), @@ -599,24 +599,24 @@ def format(target): // Returns a path containing build-related metadata required for interfacing // with Bazel. Example: out/soong/bazel. func (p *bazelPaths) intermediatesDir() string { - return filepath.Join(p.buildDir, "bazel") + return filepath.Join(p.soongOutDir, "bazel") } // Returns the path where the contents of the @soong_injection repository live. // It is used by Soong to tell Bazel things it cannot over the command line. func (p *bazelPaths) injectedFilesDir() string { - return filepath.Join(p.buildDir, bazel.SoongInjectionDirName) + return filepath.Join(p.soongOutDir, bazel.SoongInjectionDirName) } // Returns the path of the synthetic Bazel workspace that contains a symlink // forest composed the whole source tree and BUILD files generated by bp2build. func (p *bazelPaths) syntheticWorkspaceDir() string { - return filepath.Join(p.buildDir, "workspace") + return filepath.Join(p.soongOutDir, "workspace") } // Returns the path to the top level out dir ($OUT_DIR). func (p *bazelPaths) outDir() string { - return filepath.Dir(p.buildDir) + return filepath.Dir(p.soongOutDir) } // Issues commands to Bazel to receive results for all cquery requests |