Skip to content

Commit 3512263

Browse files
committed
Added comments about utility folder role in library discovery
1 parent 537227e commit 3512263

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
includes := ctx.IncludeFolders
339343
if library := sourceFile.Library; library != nil && library.UtilityDir != nil {
340344
includes = append(includes, library.UtilityDir)

0 commit comments

Comments
 (0)