Skip to content

Commit f2503fe

Browse files
committed
Moving ctx.BuildPath usage out of CppIncludeFinder
1 parent aec2199 commit f2503fe

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
@@ -112,7 +112,7 @@ import (
112112
type ContainerFindIncludes struct{}
113113

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

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

0 commit comments

Comments
 (0)