Add a hidden numParallelThreads.
@@ -82,6 +82,7 @@ import org.kohsuke.args4j.Option;
import org.kohsuke.args4j.OptionDef;
import org.kohsuke.args4j.OptionHandlerFilter;
import org.kohsuke.args4j.spi.FieldSetter;
+import org.kohsuke.args4j.spi.IntOptionHandler;
import org.kohsuke.args4j.spi.OptionHandler;
import org.kohsuke.args4j.spi.Parameters;
import org.kohsuke.args4j.spi.Setter;
@@ -477,6 +478,13 @@ public class CommandLineRunner extends
private CompilationLevel compilationLevelParsed = null;
+ @Option(
+ name = "--num_parallel_threads",
+ hidden = true,
+ handler = IntOptionHandler.class,
+ usage = "Use multiple threads to parallelize parts of the compilation.")
+ private int numParallelThreads = 1;
+
@Option(name = "--checks_only",
aliases = {"--checks-only"},
handler = BooleanOptionHandler.class,
@@ -1801,6 +1809,8 @@ public class CommandLineRunner extends
level.setDebugOptionsForCompilationLevel(options);
}
+ options.setNumParallelThreads(flags.numParallelThreads);
+
options.setEnvironment(flags.environment);
options.setChecksOnly(flags.checksOnly);
