Skip to content

Commit a668203

Browse files
committed
Added comments about utility folder role in library discovery
1 parent 7de5641 commit a668203

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
@@ -335,6 +335,10 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFileQu
335335
for {
336336
cache.ExpectFile(sourcePath)
337337

338+
// Libraries may require the "utility" directory to be added to the include
339+
// search path, but only for the source code of the library, so we temporary
340+
// copy the current search path list and add the library' utility directory
341+
// if needed.
338342
includeFolders := ctx.IncludeFolders
339343
if library := sourceFile.Library; library != nil && library.UtilityDir != nil {
340344
includeFolders = append(includeFolders, library.UtilityDir)

0 commit comments

Comments
 (0)