@@ -109,11 +109,12 @@ func (b *Builder) compileCore() (*paths.Path, paths.PathList, error) {
109
109
}
110
110
111
111
// If there is an archived core in the current build cache, use it
112
- if _ , err := buildcache .New (b .coreBuildCachePath ).GetOrCreate (archivedCoreName ); errors .Is (err , buildcache .CreateDirErr ) {
113
- return nil , nil , errors .New (i18n .Tr ("creating core cache folder: %s" , err ))
114
- }
115
112
targetArchivedCore = b .coreBuildCachePath .Join (archivedCoreName , "core.a" )
116
113
if canUseArchivedCore (targetArchivedCore ) {
114
+ // Extend the build cache expiration time
115
+ if _ , err := buildcache .New (b .coreBuildCachePath ).GetOrCreate (archivedCoreName ); errors .Is (err , buildcache .CreateDirErr ) {
116
+ return nil , nil , errors .New (i18n .Tr ("creating core cache folder: %s" , err ))
117
+ }
117
118
// use archived core
118
119
if b .logger .Verbose () {
119
120
b .logger .Info (i18n .Tr ("Using precompiled core: %[1]s" , targetArchivedCore ))
@@ -133,6 +134,11 @@ func (b *Builder) compileCore() (*paths.Path, paths.PathList, error) {
133
134
return extraTargetArchivedCore , variantObjectFiles , nil
134
135
}
135
136
}
137
+
138
+ // Create the build cache folder for the core
139
+ if _ , err := buildcache .New (b .coreBuildCachePath ).GetOrCreate (archivedCoreName ); errors .Is (err , buildcache .CreateDirErr ) {
140
+ return nil , nil , errors .New (i18n .Tr ("creating core cache folder: %s" , err ))
141
+ }
136
142
}
137
143
138
144
coreObjectFiles , err := b .compileFiles (
0 commit comments