Skip to content

Commit bfe4b83

Browse files
committed
Moving ctx.BuildPath usage out of CppIncludeFinder
1 parent cd25ba1 commit bfe4b83

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: legacy/builder/container_find_includes.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ import (
111111
type ContainerFindIncludes struct{}
112112

113113
func (s *ContainerFindIncludes) Run(ctx *types.Context) error {
114-
finder := NewCppIncludesFinder(ctx)
114+
finder := NewCppIncludesFinder(ctx, ctx.BuildPath.Join("includes.cache"))
115115
finder.UseIncludeDir(ctx.BuildProperties.GetPath("build.core.path"))
116116
if variantPath := ctx.BuildProperties.GetPath("build.variant.path"); variantPath != nil {
117117
finder.UseIncludeDir(variantPath)
@@ -146,10 +146,10 @@ type CppIncludesFinder struct {
146146
}
147147

148148
// NewCppIncludesFinder create a new include
149-
func NewCppIncludesFinder(ctx *types.Context) *CppIncludesFinder {
149+
func NewCppIncludesFinder(ctx *types.Context, cachePath *paths.Path) *CppIncludesFinder {
150150
return &CppIncludesFinder{
151151
ctx: ctx,
152-
cache: loadCacheFrom(ctx.BuildPath.Join("includes.cache")),
152+
cache: loadCacheFrom(cachePath),
153153
queue: &UniqueSourceFileQueue{},
154154
log: logrus.WithField("task", "DetectingLibraries"),
155155
}

0 commit comments

Comments
 (0)