@@ -31,7 +31,6 @@ import (
31
31
"github.com/arduino/arduino-cli/arduino/globals"
32
32
"github.com/arduino/arduino-cli/executils"
33
33
"github.com/arduino/arduino-cli/i18n"
34
- "github.com/arduino/arduino-cli/legacy/builder/constants"
35
34
rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
36
35
"github.com/arduino/go-paths-helper"
37
36
"github.com/arduino/go-properties-orderedmap"
@@ -251,8 +250,8 @@ func compileFileWithRecipe(
251
250
verboseStdout , verboseInfo , errOut := & bytes.Buffer {}, & bytes.Buffer {}, & bytes.Buffer {}
252
251
253
252
properties := buildProperties .Clone ()
254
- properties .Set (constants . BUILD_PROPERTIES_COMPILER_WARNING_FLAGS , properties .Get (constants . BUILD_PROPERTIES_COMPILER_WARNING_FLAGS + "." + warningsLevel ))
255
- properties .Set (constants . BUILD_PROPERTIES_INCLUDES , strings .Join (includes , constants . SPACE ))
253
+ properties .Set (builder . BuildPropertiesCompilerWarningFlags , properties .Get (builder . BuildPropertiesCompilerWarningFlags + "." + warningsLevel ))
254
+ properties .Set (builder . BuildPropertiesIncludes , strings .Join (includes , builder . Space ))
256
255
properties .SetPath ("source_file" , source )
257
256
relativeSource , err := sourcePath .RelTo (source )
258
257
if err != nil {
@@ -261,7 +260,7 @@ func compileFileWithRecipe(
261
260
depsFile := buildPath .Join (relativeSource .String () + ".d" )
262
261
objectFile := buildPath .Join (relativeSource .String () + ".o" )
263
262
264
- properties .SetPath (constants . BUILD_PROPERTIES_OBJECT_FILE , objectFile )
263
+ properties .SetPath (builder . BuildPropertiesObjectFile , objectFile )
265
264
err = objectFile .Parent ().MkdirAll ()
266
265
if err != nil {
267
266
return nil , nil , nil , nil , errors .WithStack (err )
@@ -345,11 +344,11 @@ func ArchiveCompiledFiles(
345
344
346
345
for _ , objectFile := range objectFilesToArchive {
347
346
properties := buildProperties .Clone ()
348
- properties .Set (constants . BUILD_PROPERTIES_ARCHIVE_FILE , archiveFilePath .Base ())
349
- properties .SetPath (constants . BUILD_PROPERTIES_ARCHIVE_FILE_PATH , archiveFilePath )
350
- properties .SetPath (constants . BUILD_PROPERTIES_OBJECT_FILE , objectFile )
347
+ properties .Set (builder . BuildPropertiesArchiveFile , archiveFilePath .Base ())
348
+ properties .SetPath (builder . BuildPropertiesArchiveFilePath , archiveFilePath )
349
+ properties .SetPath (builder . BuildPropertiesObjectFile , objectFile )
351
350
352
- command , err := PrepareCommandForRecipe (properties , constants . RECIPE_AR_PATTERN , false )
351
+ command , err := PrepareCommandForRecipe (properties , builder . RecipeARPattern , false )
353
352
if err != nil {
354
353
return nil , verboseInfobuf .Bytes (), errors .WithStack (err )
355
354
}
0 commit comments