Skip to content

Commit 5e41df4

Browse files
committed
Added comments about utility folder role in library discovery
1 parent fa6180a commit 5e41df4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

legacy/builder/container_find_includes.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,10 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
332332
for {
333333
cache.ExpectFile(sourcePath)
334334

335+
// Libraries may require the "utility" directory to be added to the include
336+
// search path, but only for the source code of the library, so we temporary
337+
// copy the current search path list and add the library' utility directory
338+
// if needed.
335339
includes := ctx.IncludeFolders
336340
if library := sourceFile.Library; library != nil && library.UtilityDir != nil {
337341
includes = append(includes, library.UtilityDir)

0 commit comments

Comments
 (0)