Skip to content

Commit f5386ca

Browse files
committed
Add library "Utility" folder in include paths together with library
I don't know the reason why it was not placed here already, the git log doesn't give much hints. Anyway this change prepares for the next commit where the Library field is being removed from SourceFile struct.
1 parent 05ff01a commit f5386ca

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

legacy/builder/container_find_includes.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,6 @@ func (f *CppIncludesFinder) findIncludesUntilDone(sourceFile SourceFile) error {
332332
f.cache.ExpectFile(sourcePath)
333333

334334
includes := f.ctx.IncludeFolders
335-
if sourceFile.Library != nil && sourceFile.Library.UtilityDir != nil {
336-
includes = append(includes, sourceFile.Library.UtilityDir)
337-
}
338335
var preproc_err error
339336
var preproc_stderr []byte
340337
if unchanged && f.cache.valid {
@@ -393,6 +390,10 @@ func (f *CppIncludesFinder) findIncludesUntilDone(sourceFile SourceFile) error {
393390
// include scanning
394391
f.ctx.ImportedLibraries = append(f.ctx.ImportedLibraries, library)
395392
f.appendIncludeFolder(sourcePath, include, library.SourceDir)
393+
if library.UtilityDir != nil {
394+
// TODO: Use library.SourceDirs() instead?
395+
includes = append(includes, library.UtilityDir)
396+
}
396397
sourceDirs := library.SourceDirs()
397398
for _, sourceDir := range sourceDirs {
398399
f.queueSourceFilesFromFolder(library, sourceDir.Dir, sourceDir.Recurse)

0 commit comments

Comments
 (0)