Skip to content

Commit 0ce1291

Browse files
m-goreckisjanc
authored andcommitted
builder: Add private includes only to specific packages
Instead of adding private includes paths to every package we should add them to the specific packages
1 parent cb6f87f commit 0ce1291

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

newt/builder/build.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,10 @@ func (b *Builder) collectCompileEntriesBpkg(bpkg *BuildPackage) (
322322
return nil, err
323323
}
324324

325+
var privateIncCi toolchain.CompilerInfo
326+
privateIncCi.Includes = bpkg.privateIncludeDirs(b)
327+
c.AddInfo(&privateIncCi)
328+
325329
srcDirs := []string{}
326330

327331
if len(bpkg.SourceDirectories) > 0 {

newt/builder/buildpackage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ func (bpkg *BuildPackage) CompilerInfo(
243243
return nil, err
244244
}
245245

246-
ci.Includes = append(bpkg.privateIncludeDirs(b), includePaths...)
246+
ci.Includes = append(ci.Includes, includePaths...)
247247
bpkg.ci = ci
248248

249249
return bpkg.ci, nil

0 commit comments

Comments
 (0)