@@ -31,7 +31,6 @@ import (
3131 "github.com/arduino/arduino-cli/arduino/globals"
3232 "github.com/arduino/arduino-cli/executils"
3333 "github.com/arduino/arduino-cli/i18n"
34- "github.com/arduino/arduino-cli/legacy/builder/constants"
3534 rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
3635 "github.com/arduino/go-paths-helper"
3736 "github.com/arduino/go-properties-orderedmap"
@@ -251,8 +250,8 @@ func compileFileWithRecipe(
251250 verboseStdout , verboseInfo , errOut := & bytes.Buffer {}, & bytes.Buffer {}, & bytes.Buffer {}
252251
253252 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 ))
256255 properties .SetPath ("source_file" , source )
257256 relativeSource , err := sourcePath .RelTo (source )
258257 if err != nil {
@@ -261,7 +260,7 @@ func compileFileWithRecipe(
261260 depsFile := buildPath .Join (relativeSource .String () + ".d" )
262261 objectFile := buildPath .Join (relativeSource .String () + ".o" )
263262
264- properties .SetPath (constants . BUILD_PROPERTIES_OBJECT_FILE , objectFile )
263+ properties .SetPath (builder . BuildPropertiesObjectFile , objectFile )
265264 err = objectFile .Parent ().MkdirAll ()
266265 if err != nil {
267266 return nil , nil , nil , nil , errors .WithStack (err )
@@ -345,11 +344,11 @@ func ArchiveCompiledFiles(
345344
346345 for _ , objectFile := range objectFilesToArchive {
347346 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 )
351350
352- command , err := PrepareCommandForRecipe (properties , constants . RECIPE_AR_PATTERN , false )
351+ command , err := PrepareCommandForRecipe (properties , builder . RecipeARPattern , false )
353352 if err != nil {
354353 return nil , verboseInfobuf .Bytes (), errors .WithStack (err )
355354 }
0 commit comments