Skip to content

Commit 37a2018

Browse files
committed
allow hack to be applied also to out-of-boardmanager boards
1 parent 58963e4 commit 37a2018

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Diff for: src/arduino.cc/builder/add_missing_build_properties_from_parent_platform_txt_files.go

+5
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ func (s *OverridePropertiesWithJsonInfo) Run(ctx *types.Context) error {
7676
if ctx.TargetBoard.Properties["build.core"] == "arduino:arduino" && buildProperties[constants.HACK_PROPERTIES_AVR_GCC_NEW] != "" {
7777
buildProperties[constants.HACK_PROPERTIES_AVR_GCC_OLD] =
7878
"{" + constants.HACK_PROPERTIES_AVR_GCC_NEW + "}"
79+
// if base runtime property is fully specified it needs to be replaced
80+
if !strings.HasPrefix(buildProperties[constants.HACK_PROPERTIES_AVR_GCC_OLD_2], "{") {
81+
buildProperties[constants.HACK_PROPERTIES_AVR_GCC_OLD_2] =
82+
"{" + constants.HACK_PROPERTIES_AVR_GCC_NEW + "}"
83+
}
7984
}
8085

8186
ctx.BuildProperties = buildProperties

Diff for: src/arduino.cc/builder/constants/constants.go

+1
Original file line numberDiff line numberDiff line change
@@ -213,3 +213,4 @@ const TOOL_VERSION = "version"
213213
const ADDITIONALE_BOARD_MANAGER_JSON = "boardsmanager.additional.urls"
214214
const HACK_PROPERTIES_AVR_GCC_NEW = BUILD_PROPERTIES_RUNTIME_TOOLS_PREFIX + "avr-gcc-arduino-4.9.2-atmel3.5.3-arduino2" + BUILD_PROPERTIES_RUNTIME_TOOLS_SUFFIX
215215
const HACK_PROPERTIES_AVR_GCC_OLD = BUILD_PROPERTIES_RUNTIME_TOOLS_PREFIX + "avr-gcc-arduino-4.8.1-arduino5" + BUILD_PROPERTIES_RUNTIME_TOOLS_SUFFIX
216+
const HACK_PROPERTIES_AVR_GCC_OLD_2 = BUILD_PROPERTIES_RUNTIME_TOOLS_PREFIX + "avr-gcc" + BUILD_PROPERTIES_RUNTIME_TOOLS_SUFFIX

0 commit comments

Comments
 (0)