Skip to content

Commit 8e1d280

Browse files
committed
Moving ctx.BuildPath usage out of CppIncludeFinder
1 parent 1ce2fce commit 8e1d280

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
@@ -121,7 +121,7 @@ func (s *ContainerFindIncludes) Run(ctx *types.Context) error {
121121
}
122122

123123
func (s *ContainerFindIncludes) findIncludes(ctx *types.Context) error {
124-
finder := NewCppIncludesFinder(ctx)
124+
finder := NewCppIncludesFinder(ctx, ctx.BuildPath.Join("includes.cache"))
125125
finder.UseIncludeDir(ctx.BuildProperties.GetPath("build.core.path"))
126126
if variantPath := ctx.BuildProperties.GetPath("build.variant.path"); variantPath != nil {
127127
finder.UseIncludeDir(variantPath)
@@ -156,10 +156,10 @@ type CppIncludesFinder struct {
156156
}
157157

158158
// NewCppIncludesFinder create a new include
159-
func NewCppIncludesFinder(ctx *types.Context) *CppIncludesFinder {
159+
func NewCppIncludesFinder(ctx *types.Context, cachePath *paths.Path) *CppIncludesFinder {
160160
return &CppIncludesFinder{
161161
ctx: ctx,
162-
cache: loadCacheFrom(ctx.BuildPath.Join("includes.cache")),
162+
cache: loadCacheFrom(cachePath),
163163
queue: &UniqueSourceFileQueue{},
164164
log: logrus.WithField("task", "DetectingLibraries"),
165165
}

0 commit comments

Comments
 (0)