Preserve the user's value for --experimental_prefer_mutual_xcode in the apple host configuration, so that Bazel selects the same Xcode for all parts of the build.
RELNOTES: None.
@@ -480,6 +480,9 @@ public class AppleCommandLineOptions extends FragmentOptions {
// be needed.
host.applePlatformType = PlatformType.MACOS;
host.configurationDistinguisher = ConfigurationDistinguisher.UNKNOWN;
+ // Preseve Xcode selection preferences so that the same Xcode version is used throughout the
+ // build.
+ host.preferMutualXcode = preferMutualXcode;
return host;
}
