Skip to content

Commit 538317c

Browse files
committed
Only apply the hack if the core explicitely references "arduino" core
This leaves non-derived cores (like MightCore or Cosa) the freedom to specify their own tools (overriding avr 1.6.12 lto requirement)
1 parent e9fc24e commit 538317c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/arduino.cc/builder/add_missing_build_properties_from_parent_platform_txt_files.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func (s *OverridePropertiesWithJsonInfo) Run(ctx *types.Context) error {
7171

7272
// HACK!!! To overcome AVR core 1.6.12 lto problems, replace avr-gcc-4.8.1-arduino5 with
7373
// 4.9.2-atmel3.5.3-arduino2 if it exists
74-
if buildProperties[constants.HACK_PROPERTIES_AVR_GCC_NEW] != "" {
74+
if ctx.TargetBoard.Properties["build.core"] == "arduino:arduino" && buildProperties[constants.HACK_PROPERTIES_AVR_GCC_NEW] != "" {
7575
buildProperties[constants.HACK_PROPERTIES_AVR_GCC_OLD] =
7676
"{" + constants.HACK_PROPERTIES_AVR_GCC_NEW + "}"
7777
}

0 commit comments

Comments
 (0)