aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/common.mk
diff options
context:
space:
mode:
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)
160endif 160endif
161 161
162ifeq ($(strip $(LTO_ENABLE)), yes) 162ifeq ($(strip $(LTO_ENABLE)), yes)
163 LINK_TIME_OPTIMIZATION_ENABLE = yes
164endif
165
166ifeq ($(strip $(LINK_TIME_OPTIMIZATION_ENABLE)), yes)
167 ifeq ($(PLATFORM),CHIBIOS) 163 ifeq ($(PLATFORM),CHIBIOS)
168 $(info Enabling LTO on ChibiOS-targeting boards is known to have a high likelihood of failure.) 164 $(info Enabling LTO on ChibiOS-targeting boards is known to have a high likelihood of failure.)
169 $(info If unsure, set LINK_TIME_OPTIMIZATION_ENABLE = no.) 165 $(info If unsure, set LTO_ENABLE = no.)
170 endif 166 endif
171 EXTRAFLAGS += -flto 167 EXTRAFLAGS += -flto
172 TMK_COMMON_DEFS += -DLINK_TIME_OPTIMIZATION_ENABLE 168 TMK_COMMON_DEFS += -DLTO_ENABLE
169 TMK_COMMON_DEFS += -DLINK_TIME_OPTIMIZATON_ENABLE
173endif 170endif
174 171
175# Search Path 172# Search Path