Use middleman for objc compilation
This significantly reduces memory consumption for objc compilation with
toolchains that have a lot of files in the compile filegroup.
@@ -96,7 +96,7 @@ public class ObjcCppSemantics implements CppSemantics {
actionBuilder
// Because Bazel does not support include scanning, we need the entire crosstool filegroup,
// including header files, as opposed to just the "compile" filegroup.
- .addTransitiveMandatoryInputs(actionBuilder.getToolchain().getAllFiles())
+ .addTransitiveMandatoryInputs(actionBuilder.getToolchain().getAllFilesMiddleman())
.setShouldScanIncludes(false);
if (!starlarkSemantics.incompatibleObjcFrameworkCleanup()) {
