Skip to content

Commit

Permalink
builder: Add private includes only to specific packages
Browse files Browse the repository at this point in the history
Instead of adding private includes paths to every package
we should add them to the specific packages
  • Loading branch information
m-gorecki committed Apr 16, 2024
1 parent cb6f87f commit b28ea19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions newt/builder/build.go
Expand Up @@ -322,6 +322,10 @@ 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 {
Expand Down
2 changes: 1 addition & 1 deletion newt/builder/buildpackage.go
Expand Up @@ -243,7 +243,7 @@ func (bpkg *BuildPackage) CompilerInfo(
return nil, err
}

ci.Includes = append(bpkg.privateIncludeDirs(b), includePaths...)
ci.Includes = append(ci.Includes, includePaths...)
bpkg.ci = ci

return bpkg.ci, nil
Expand Down

0 comments on commit b28ea19

Please sign in to comment.