diff --git a/newt/builder/build.go b/newt/builder/build.go index 287ef0b22..b611df3af 100644 --- a/newt/builder/build.go +++ b/newt/builder/build.go @@ -322,10 +322,6 @@ func (b *Builder) collectCompileEntriesBpkg(bpkg *BuildPackage) ( return nil, err } - var privateIncCi toolchain.CompilerInfo - privateIncCi.Includes = bpkg.privateIncludeDirs(b) - c.AddInfo(&privateIncCi) - srcDirs := []string{} if len(bpkg.SourceDirectories) > 0 { diff --git a/newt/builder/buildpackage.go b/newt/builder/buildpackage.go index 9513bceff..7bcd835d8 100644 --- a/newt/builder/buildpackage.go +++ b/newt/builder/buildpackage.go @@ -243,7 +243,7 @@ func (bpkg *BuildPackage) CompilerInfo( return nil, err } - ci.Includes = append(ci.Includes, includePaths...) + ci.Includes = append(bpkg.privateIncludeDirs(b), includePaths...) bpkg.ci = ci return bpkg.ci, nil