From 92385b3fb617326b129609726020453c8949c7f8 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 22 Aug 2020 01:21:06 -0700 Subject: Better handle LTO_ENABLE (#9832) * Better handle LTO_ENABLE Especially when calling from command line * Replace LINK_TIME_OPTIMIZATION_ENABLE with LTO_ENABLE * Remove long for LTO from show_options.mk --- tmk_core/common.mk | 9 +++------ tmk_core/common/action.h | 2 +- tmk_core/common/command.c | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) (limited to 'tmk_core') diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 56ed4a857..a6c439f5c 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -160,16 +160,13 @@ ifeq ($(strip $(SHARED_EP_ENABLE)), yes) endif ifeq ($(strip $(LTO_ENABLE)), yes) - LINK_TIME_OPTIMIZATION_ENABLE = yes -endif - -ifeq ($(strip $(LINK_TIME_OPTIMIZATION_ENABLE)), yes) ifeq ($(PLATFORM),CHIBIOS) $(info Enabling LTO on ChibiOS-targeting boards is known to have a high likelihood of failure.) - $(info If unsure, set LINK_TIME_OPTIMIZATION_ENABLE = no.) + $(info If unsure, set LTO_ENABLE = no.) endif EXTRAFLAGS += -flto - TMK_COMMON_DEFS += -DLINK_TIME_OPTIMIZATION_ENABLE + TMK_COMMON_DEFS += -DLTO_ENABLE + TMK_COMMON_DEFS += -DLINK_TIME_OPTIMIZATON_ENABLE endif # Search Path diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index c82c9c81b..345c030c9 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h @@ -29,7 +29,7 @@ extern "C" { #endif /* Disable macro and function features when LTO is enabled, since they break */ -#ifdef LINK_TIME_OPTIMIZATION_ENABLE +#ifdef LTO_ENABLE # ifndef NO_ACTION_MACRO # define NO_ACTION_MACRO # endif diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index ef6a39c0f..feeb2202e 100644 --- a/tmk_core/common/command.c +++ b/tmk_core/common/command.c @@ -180,7 +180,7 @@ static void print_version(void) { #ifdef NKRO_ENABLE " NKRO" #endif -#ifdef LINK_TIME_OPTIMIZATION_ENABLE +#ifdef LTO_ENABLE " LTO" #endif -- cgit v1.2.3