Skip to content

Commit 4853add

Browse files
committed
Library discovery: add additional include paths after discovering the library
1 parent 6058360 commit 4853add

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Diff for: legacy/builder/container_find_includes.go

+4-5
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,6 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile t
318318
if library, ok := sourceFile.Origin.(*libraries.Library); ok && library.UtilityDir != nil {
319319
includes = append(includes, library.UtilityDir)
320320
}
321-
if library, ok := sourceFile.Origin.(*libraries.Library); ok && library.AdditionalIncludePaths != nil {
322-
for _, el := range library.AdditionalIncludePaths {
323-
includes = append(includes, el)
324-
}
325-
}
326321
var preproc_err error
327322
var preproc_stderr []byte
328323
if unchanged && cache.valid {
@@ -376,6 +371,10 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile t
376371
return i18n.WrapError(preproc_err)
377372
}
378373

374+
for _, el := range library.AdditionalIncludePaths {
375+
appendIncludeFolder(ctx, cache, sourcePath, include, el)
376+
}
377+
379378
// Add this library to the list of libraries, the
380379
// include path and queue its source files for further
381380
// include scanning

0 commit comments

Comments
 (0)