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

Commit cbee4e3f authored by Vinh Tran's avatar Vinh Tran
Browse files

Remove --extra_toolchains flag from aquery runner

When specifying --extra_toolchains=//prebuilts/clang/host/linux-x86:all, there is no control over the sort order of toolchains, which can result in a more generic toolchain being used rather than the most specific (and correct) toolchain.

Apparently, this flag is causing Bazel to drop some flags from CppCompile actions. This causes mixed-build's outputs different from Soong build. The mixed-build also generates different from Bazel build because we don't use the flag when using `b` to build the targets.

Test: Inspect differences in CppCompile actions from Soong's Bazel aquery handler and b aquery
Bug: 273995121
Change-Id: Id9e32c0cd12ab8577cd5b223ca9e19c982f3ae1f
parent 9741785c
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -736,15 +736,6 @@ func (r *builtinBazelRunner) createBazelCommand(config Config, paths *bazelPaths
		// TODO(asmundak): is it needed in every build?
		"--profile=" + shared.BazelMetricsFilename(paths, runName),

		// Set default platforms to canonicalized values for mixed builds requests.
		// If these are set in the bazelrc, they will have values that are
		// non-canonicalized to @sourceroot labels, and thus be invalid when
		// referenced from the buildroot.
		//
		// The actual platform values here may be overridden by configuration
		// transitions from the buildroot.
		fmt.Sprintf("--extra_toolchains=%s", "//prebuilts/clang/host/linux-x86:all"),

		// We don't need to set --host_platforms because it's set in bazelrc files
		// that the bazel shell script wrapper passes