private static boolean invokeJavac(
    int compilerSdkVersion,
    CompileContext context,
    ModuleChunk chunk,
    @NotNull JavaCompilingTool compilingTool,
    Iterable<String> options,
    Iterable<? extends File> files,
    OutputFileConsumer outSink,
    JavacCaller javacCall
  ) {
    if (Iterators.contains(options, PROC_ONLY_OPTION)) {
      // make a dedicated javac call for annotation processing only
      final Collection<File> generated = new ArrayList<>();
      final boolean processingSuccess = javacCall.invoke(options, files, fileObject -> {
        if (fileObject.getKind() == JavaFileObject.Kind.SOURCE) {
          generated.add(fileObject.getFile());
        }
        outSink.save(fileObject);
      });
      if (!processingSuccess) {
        return false;
      }
      // now call javac with processor-generated sources and without processing-related options
      final Iterable<String> compileOnlyOptions = getCompilationOptions(compilerSdkVersion, context, chunk, null, compilingTool).second;
      return javacCall.invoke(compileOnlyOptions, Iterators.flat(files, generated), outSink);
    }

    return javacCall.invoke(options, files, outSink);
  }
private static boolean invokeJavac(
    int compilerSdkVersion,
    CompileContext context,
    ModuleChunk chunk,
    @NotNull JavaCompilingTool compilingTool,
    Iterable<String> options,
    Iterable<? extends File> files,
    OutputFileConsumer outSink,
    JavacCaller javacCall
  )