From 6058360927a0577ca8f1f54a86c455886b36d5de Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Fri, 29 Nov 2019 17:13:22 +0100 Subject: [PATCH] Add additional paths also in library discovery phase This tries to avoid bundled libraries shadowing other includes --- legacy/builder/container_find_includes.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/legacy/builder/container_find_includes.go b/legacy/builder/container_find_includes.go index 2221c8cfde4..1aba04b1490 100644 --- a/legacy/builder/container_find_includes.go +++ b/legacy/builder/container_find_includes.go @@ -318,6 +318,11 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile t if library, ok := sourceFile.Origin.(*libraries.Library); ok && library.UtilityDir != nil { includes = append(includes, library.UtilityDir) } + if library, ok := sourceFile.Origin.(*libraries.Library); ok && library.AdditionalIncludePaths != nil { + for _, el := range library.AdditionalIncludePaths { + includes = append(includes, el) + } + } var preproc_err error var preproc_stderr []byte if unchanged && cache.valid {