Skip to content

Commit 8d0a1c0

Browse files
author
Federico Fissore
committed
Added BUILD_PROPERTIES_ARCHIVE_FILE_PATH to linker props
Signed-off-by: Federico Fissore <[email protected]>
1 parent afdee0d commit 8d0a1c0

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/arduino.cc/builder/phases/linker.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ func (s *Linker) Run(context map[string]interface{}) error {
6060
warningsLevel := context[constants.CTX_WARNINGS_LEVEL].(string)
6161
logger := context[constants.CTX_LOGGER].(i18n.Logger)
6262

63-
err = link(objectFiles, coreDotARelPath, buildProperties, verbose, warningsLevel, logger)
63+
err = link(objectFiles, coreDotARelPath, coreArchiveFilePath, buildProperties, verbose, warningsLevel, logger)
6464
if err != nil {
6565
return utils.WrapError(err)
6666
}
6767

6868
return nil
6969
}
7070

71-
func link(objectFiles []string, coreArchiveFilePath string, buildProperties map[string]string, verbose bool, warningsLevel string, logger i18n.Logger) error {
71+
func link(objectFiles []string, coreDotARelPath string, coreArchiveFilePath string, buildProperties map[string]string, verbose bool, warningsLevel string, logger i18n.Logger) error {
7272
optRelax := addRelaxTrickIfATMEGA2560(buildProperties)
7373

7474
objectFiles = utils.Map(objectFiles, wrapWithDoubleQuotes)
@@ -77,7 +77,8 @@ func link(objectFiles []string, coreArchiveFilePath string, buildProperties map[
7777
properties := utils.MergeMapsOfStrings(make(map[string]string), buildProperties)
7878
properties[constants.BUILD_PROPERTIES_COMPILER_C_ELF_FLAGS] = properties[constants.BUILD_PROPERTIES_COMPILER_C_ELF_FLAGS] + optRelax
7979
properties[constants.BUILD_PROPERTIES_COMPILER_WARNING_FLAGS] = properties[constants.BUILD_PROPERTIES_COMPILER_WARNING_FLAGS+"."+warningsLevel]
80-
properties[constants.BUILD_PROPERTIES_ARCHIVE_FILE] = coreArchiveFilePath
80+
properties[constants.BUILD_PROPERTIES_ARCHIVE_FILE] = coreDotARelPath
81+
properties[constants.BUILD_PROPERTIES_ARCHIVE_FILE_PATH] = coreArchiveFilePath
8182
properties[constants.BUILD_PROPERTIES_OBJECT_FILES] = objectFileList
8283

8384
_, err := builder_utils.ExecRecipe(properties, constants.RECIPE_C_COMBINE_PATTERN, false, verbose, verbose, logger)

src/arduino.cc/builder/test/helper.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ package test
3232
import (
3333
"arduino.cc/builder/constants"
3434
"arduino.cc/builder/types"
35+
"bytes"
3536
"fmt"
3637
"github.com/go-errors/errors"
3738
"github.com/stretchr/testify/assert"
3839
"io/ioutil"
3940
"path/filepath"
4041
"testing"
4142
"text/template"
42-
"bytes"
4343
)
4444

4545
func LoadAndInterpolate(t *testing.T, filename string, context map[string]interface{}) string {

src/arduino.cc/builder/test/sketch_source_merger_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import (
3939
"testing"
4040
)
4141

42-
4342
func TestMergeSketch(t *testing.T) {
4443
context := make(map[string]interface{})
4544
context[constants.CTX_SKETCH_LOCATION] = filepath.Join("sketch1", "sketch.ino")

0 commit comments

Comments
 (0)