diff options
-rw-r--r-- | changelog.md | 3 | ||||
-rw-r--r-- | show_options.mk | 3 | ||||
-rw-r--r-- | tmk_core/common.mk | 7 |
3 files changed, 11 insertions, 2 deletions
diff --git a/changelog.md b/changelog.md index 9194f2bcc1..e83216cfe9 100644 --- a/changelog.md +++ b/changelog.md @@ -13,4 +13,5 @@ 04-22-2019 - Add Split RGB support 04-24-2019 - fix LIB_SRC and QUANTUM_LIB_SRC for ARM 04-24-2019 - Add RGB Split fixes and RGB Names -05-05-2019 - Fix issue with Space Cadet +05-05-2019 - Add `LINK_TIME_OPTIMIZATION_ENABLE` to enable LTO and disable problematic features that cause LTO to fail +05-05-2019 - Fix issue with Space Cadet diff --git a/show_options.mk b/show_options.mk index c72059118f..02e062a8d9 100644 --- a/show_options.mk +++ b/show_options.mk @@ -88,7 +88,8 @@ OTHER_OPTION_NAMES = \ RGB_MATRIX_KEYPRESSES \ LED_MIRRORED \ RGBLIGHT_FULL_POWER \ - Link_Time_Optimization + Link_Time_Optimization \ + LINK_TIME_OPTIMIZATION_ENABLE define NAME_ECHO @echo " $1 = $($1) # $(origin $1)" diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 94f3c2380d..2216887555 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -208,6 +208,13 @@ ifeq ($(strip $(SHARED_EP_ENABLE)), yes) TMK_COMMON_DEFS += -DSHARED_EP_ENABLE endif + +ifeq ($(strip $(LINK_TIME_OPTIMIZATION_ENABLE)), yes) + EXTRAFLAGS += -flto + TMK_COMMON_DEFS += -DLINK_TIME_OPTIMIZATION_ENABLE + TMK_COMMON_DEFS += -DNO_ACTION_MACRO + TMK_COMMON_DEFS += -DNO_ACTION_FUNCTION +endif # Bootloader address ifdef STM32_BOOTLOADER_ADDRESS TMK_COMMON_DEFS += -DSTM32_BOOTLOADER_ADDRESS=$(STM32_BOOTLOADER_ADDRESS) |