@@ -209,8 +209,9 @@ func (l *SketchLibrariesDetector) FindIncludes(
209209 librariesBuildPath * paths.Path ,
210210 buildProperties * properties.Map ,
211211 platformArch string ,
212+ jobs int ,
212213) error {
213- err := l .findIncludes (ctx , buildPath , buildCorePath , buildVariantPath , sketchBuildPath , sketch , librariesBuildPath , buildProperties , platformArch )
214+ err := l .findIncludes (ctx , buildPath , buildCorePath , buildVariantPath , sketchBuildPath , sketch , librariesBuildPath , buildProperties , platformArch , jobs )
214215 if err != nil && l .onlyUpdateCompilationDatabase {
215216 l .logger .Info (
216217 fmt .Sprintf (
@@ -234,6 +235,7 @@ func (l *SketchLibrariesDetector) findIncludes(
234235 librariesBuildPath * paths.Path ,
235236 buildProperties * properties.Map ,
236237 platformArch string ,
238+ jobs int ,
237239) error {
238240 librariesResolutionCache := buildPath .Join ("libraries.cache" )
239241 if l .useCachedLibrariesResolution && librariesResolutionCache .Exist () {
@@ -256,7 +258,7 @@ func (l *SketchLibrariesDetector) findIncludes(
256258 }
257259
258260 // Pre-run cache entries
259- l .preRunner = runner .New (ctx )
261+ l .preRunner = runner .New (ctx , jobs )
260262 for _ , entry := range l .cache .EntriesAhead () {
261263 if entry .Compile != nil && entry .CompileTask != nil {
262264 upToDate , _ := entry .Compile .ObjFileIsUpToDate ()
@@ -307,7 +309,7 @@ func (l *SketchLibrariesDetector) findIncludes(
307309
308310 // Create a new pre-runner if the previous one was cancelled
309311 if l .preRunner == nil {
310- l .preRunner = runner .New (ctx )
312+ l .preRunner = runner .New (ctx , jobs )
311313 // Push in the remainder of the queue
312314 for _ , sourceFile := range * sourceFileQueue {
313315 l .preRunner .Enqueue (l .gccPreprocessTask (sourceFile , buildProperties ))
0 commit comments