@@ -191,8 +191,9 @@ func (l *SketchLibrariesDetector) FindIncludes(
191191 librariesBuildPath * paths.Path ,
192192 buildProperties * properties.Map ,
193193 platformArch string ,
194+ jobs int ,
194195) error {
195- err := l .findIncludes (ctx , buildPath , buildCorePath , buildVariantPath , sketchBuildPath , sketch , librariesBuildPath , buildProperties , platformArch )
196+ err := l .findIncludes (ctx , buildPath , buildCorePath , buildVariantPath , sketchBuildPath , sketch , librariesBuildPath , buildProperties , platformArch , jobs )
196197 if err != nil && l .onlyUpdateCompilationDatabase {
197198 l .logger .Info (
198199 fmt .Sprintf (
@@ -216,6 +217,7 @@ func (l *SketchLibrariesDetector) findIncludes(
216217 librariesBuildPath * paths.Path ,
217218 buildProperties * properties.Map ,
218219 platformArch string ,
220+ jobs int ,
219221) error {
220222 librariesResolutionCache := buildPath .Join ("libraries.cache" )
221223 if l .useCachedLibrariesResolution && librariesResolutionCache .Exist () {
@@ -238,7 +240,7 @@ func (l *SketchLibrariesDetector) findIncludes(
238240 }
239241
240242 // Pre-run cache entries
241- l .preRunner = runner .New (ctx )
243+ l .preRunner = runner .New (ctx , jobs )
242244 for _ , entry := range l .cache .EntriesAhead () {
243245 if entry .Compile != nil && entry .CompileTask != nil {
244246 upToDate , _ := entry .Compile .ObjFileIsUpToDate ()
@@ -279,7 +281,7 @@ func (l *SketchLibrariesDetector) findIncludes(
279281
280282 // Create a new pre-runner if the previous one was cancelled
281283 if l .preRunner == nil {
282- l .preRunner = runner .New (ctx )
284+ l .preRunner = runner .New (ctx , jobs )
283285 // Push in the remainder of the queue
284286 for _ , sourceFile := range * sourceFileQueue {
285287 l .preRunner .Enqueue (l .gccPreprocessTask (sourceFile , buildProperties ))
0 commit comments