Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit adf5564f authored by Jingwen Chen's avatar Jingwen Chen Committed by Gerrit Code Review
Browse files

Merge "Fix OUT_DIR lookup in mixed builds."

parents a8f4e62b 8c52358a
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -351,6 +351,9 @@ func (r *builtinBazelRunner) issueBazelCommand(paths *bazelPaths, runName bazel.
		"HOME="+paths.homeDir,
		pwdPrefix(),
		"BUILD_DIR="+absolutePath(paths.buildDir),
		// 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()),
		// Disables local host detection of gcc; toolchain information is defined
		// explicitly in BUILD files.
		"BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1")
@@ -576,6 +579,11 @@ func (p *bazelPaths) syntheticWorkspaceDir() string {
	return filepath.Join(p.buildDir, "workspace")
}

// Returns the path to the top level out dir ($OUT_DIR).
func (p *bazelPaths) outDir() string {
	return filepath.Dir(p.buildDir)
}

// Issues commands to Bazel to receive results for all cquery requests
// queued in the BazelContext.
func (context *bazelContext) InvokeBazel() error {
+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ df -h

echo
echo "Running Bazel smoke test..."
"${TOP}/tools/bazel" --batch --max_idle_secs=1 info
STANDALONE_BAZEL=true "${TOP}/tools/bazel" --batch --max_idle_secs=1 info

echo
echo "Running Soong test..."
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ function test_bazel_smoke {
  setup
  create_mock_bazel

  run_bazel info
  STANDALONE_BAZEL=true run_bazel info
}

test_bazel_smoke