Skip to content

Commit 0b9d7bd

Browse files
committed
Added comments about utility folder role in library discovery
1 parent 8b6dba4 commit 0b9d7bd

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
@@ -312,6 +312,10 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile *
312312
for {
313313
cache.ExpectFile(sourcePath)
314314

315+
// Libraries may require the "utility" directory to be added to the include
316+
// search path, but only for the source code of the library, so we temporary
317+
// copy the current search path list and add the library' utility directory
318+
// if needed.
315319
includes := ctx.IncludeFolders
316320
if library := sourceFile.Library; library != nil && library.UtilityDir != nil {
317321
includes = append(includes, library.UtilityDir)

0 commit comments

Comments
 (0)