@@ -336,9 +336,9 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
336
336
// search path, but only for the source code of the library, so we temporary
337
337
// copy the current search path list and add the library' utility directory
338
338
// if needed.
339
- includes := ctx .IncludeFolders
339
+ includeFolders := ctx .IncludeFolders
340
340
if library := sourceFile .Library ; library != nil && library .UtilityDir != nil {
341
- includes = append (includes , library .UtilityDir )
341
+ includeFolders = append (includeFolders , library .UtilityDir )
342
342
}
343
343
344
344
if library := sourceFile .Library ; library != nil {
@@ -362,7 +362,7 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
362
362
ctx .Info (tr ("Using cached library dependencies for file: %[1]s" , sourcePath ))
363
363
}
364
364
} else {
365
- preproc_stderr , preproc_err = GCCPreprocRunnerForDiscoveringIncludes (ctx , sourcePath , targetFilePath , includes )
365
+ preproc_stderr , preproc_err = GCCPreprocRunnerForDiscoveringIncludes (ctx , sourcePath , targetFilePath , includeFolders )
366
366
// Unwrap error and see if it is an ExitError.
367
367
if preproc_err == nil {
368
368
// Preprocessor successful, done
@@ -391,7 +391,7 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
391
391
// return errors.WithStack(err)
392
392
if preproc_err == nil || preproc_stderr == nil {
393
393
// Filename came from cache, so run preprocessor to obtain error to show
394
- preproc_stderr , preproc_err = GCCPreprocRunnerForDiscoveringIncludes (ctx , sourcePath , targetFilePath , includes )
394
+ preproc_stderr , preproc_err = GCCPreprocRunnerForDiscoveringIncludes (ctx , sourcePath , targetFilePath , includeFolders )
395
395
if preproc_err == nil {
396
396
// If there is a missing #include in the cache, but running
397
397
// gcc does not reproduce that, there is something wrong.
0 commit comments