aboutsummaryrefslogtreecommitdiffstats
path: root/tmk_core/common.mk
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2020-08-22 01:21:06 -0700
committerJames Young <18669334+noroadsleft@users.noreply.github.com>2020-08-29 14:30:02 -0700
commit92385b3fb617326b129609726020453c8949c7f8 (patch)
tree29d881897a59f0b1568bbaf21534c81360ad21e6 /tmk_core/common.mk
parent3f392c09b60d46d9e4a4d3cc150a26294dea4da7 (diff)
downloadfirmware-92385b3fb617326b129609726020453c8949c7f8.tar.gz
firmware-92385b3fb617326b129609726020453c8949c7f8.tar.bz2
firmware-92385b3fb617326b129609726020453c8949c7f8.zip
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
Diffstat (limited to 'tmk_core/common.mk')
-rw-r--r--tmk_core/common.mk9
1 files changed, 3 insertions, 6 deletions
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