@@ -316,9 +316,9 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
316
316
// search path, but only for the source code of the library, so we temporary
317
317
// copy the current search path list and add the library' utility directory
318
318
// if needed.
319
- includes := ctx .IncludeFolders
319
+ includeFolders := ctx .IncludeFolders
320
320
if library := sourceFile .Library ; library != nil && library .UtilityDir != nil {
321
- includes = append (includes , library .UtilityDir )
321
+ includeFolders = append (includeFolders , library .UtilityDir )
322
322
}
323
323
324
324
if library := sourceFile .Library ; library != nil {
@@ -342,7 +342,7 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
342
342
ctx .Info (tr ("Using cached library dependencies for file: %[1]s" , sourcePath ))
343
343
}
344
344
} else {
345
- preproc_stderr , preproc_err = GCCPreprocRunnerForDiscoveringIncludes (ctx , sourcePath , targetFilePath , includes )
345
+ preproc_stderr , preproc_err = GCCPreprocRunnerForDiscoveringIncludes (ctx , sourcePath , targetFilePath , includeFolders )
346
346
// Unwrap error and see if it is an ExitError.
347
347
if preproc_err == nil {
348
348
// Preprocessor successful, done
@@ -371,7 +371,7 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
371
371
// return errors.WithStack(err)
372
372
if preproc_err == nil || preproc_stderr == nil {
373
373
// Filename came from cache, so run preprocessor to obtain error to show
374
- preproc_stderr , preproc_err = GCCPreprocRunnerForDiscoveringIncludes (ctx , sourcePath , targetFilePath , includes )
374
+ preproc_stderr , preproc_err = GCCPreprocRunnerForDiscoveringIncludes (ctx , sourcePath , targetFilePath , includeFolders )
375
375
if preproc_err == nil {
376
376
// If there is a missing #include in the cache, but running
377
377
// gcc does not reproduce that, there is something wrong.
0 commit comments