@@ -191,8 +191,9 @@ func (l *SketchLibrariesDetector) FindIncludes(
191
191
librariesBuildPath * paths.Path ,
192
192
buildProperties * properties.Map ,
193
193
platformArch string ,
194
+ jobs int ,
194
195
) 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 )
196
197
if err != nil && l .onlyUpdateCompilationDatabase {
197
198
l .logger .Info (
198
199
fmt .Sprintf (
@@ -216,6 +217,7 @@ func (l *SketchLibrariesDetector) findIncludes(
216
217
librariesBuildPath * paths.Path ,
217
218
buildProperties * properties.Map ,
218
219
platformArch string ,
220
+ jobs int ,
219
221
) error {
220
222
librariesResolutionCache := buildPath .Join ("libraries.cache" )
221
223
if l .useCachedLibrariesResolution && librariesResolutionCache .Exist () {
@@ -238,7 +240,7 @@ func (l *SketchLibrariesDetector) findIncludes(
238
240
}
239
241
240
242
// Pre-run cache entries
241
- l .preRunner = runner .New (ctx )
243
+ l .preRunner = runner .New (ctx , jobs )
242
244
for _ , entry := range l .cache .EntriesAhead () {
243
245
if entry .Compile != nil && entry .CompileTask != nil {
244
246
upToDate , _ := entry .Compile .ObjFileIsUpToDate ()
@@ -279,7 +281,7 @@ func (l *SketchLibrariesDetector) findIncludes(
279
281
280
282
// Create a new pre-runner if the previous one was cancelled
281
283
if l .preRunner == nil {
282
- l .preRunner = runner .New (ctx )
284
+ l .preRunner = runner .New (ctx , jobs )
283
285
// Push in the remainder of the queue
284
286
for _ , sourceFile := range * sourceFileQueue {
285
287
l .preRunner .Enqueue (l .gccPreprocessTask (sourceFile , buildProperties ))
0 commit comments