aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/rules.mk
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2021-10-28 21:02:22 +0100
committerGitHub <noreply@github.com>2021-10-28 21:02:22 +0100
commit0c87e2e7025140ca6105b7fec2639c78c3cd8109 (patch)
treebfe242f1216de578f6acc3ff797af781856b3873 /tmk_core/rules.mk
parent780e763c13052138e4d9ad379c4138c3b2c344a7 (diff)
downloadqmk_firmware-0c87e2e7025140ca6105b7fec2639c78c3cd8109.tar.gz
qmk_firmware-0c87e2e7025140ca6105b7fec2639c78c3cd8109.zip
Move LTO logic from common.mk (#14973)
Diffstat (limited to 'tmk_core/rules.mk')
-rw-r--r--tmk_core/rules.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk
index 56a331e28..b17f85d37 100644
--- a/tmk_core/rules.mk
+++ b/tmk_core/rules.mk
@@ -82,6 +82,15 @@ endif
82# -Wall...: warning level 82# -Wall...: warning level
83# -Wa,...: tell GCC to pass this to the assembler. 83# -Wa,...: tell GCC to pass this to the assembler.
84# -adhlns...: create assembler listing 84# -adhlns...: create assembler listing
85ifeq ($(strip $(LTO_ENABLE)), yes)
86 ifeq ($(PLATFORM),CHIBIOS)
87 $(info Enabling LTO on ChibiOS-targeting boards is known to have a high likelihood of failure.)
88 $(info If unsure, set LTO_ENABLE = no.)
89 endif
90 CDEFS += -flto
91 CDEFS += -DLTO_ENABLE
92endif
93
85DEBUG_ENABLE ?= yes 94DEBUG_ENABLE ?= yes
86ifeq ($(strip $(SKIP_DEBUG_INFO)),yes) 95ifeq ($(strip $(SKIP_DEBUG_INFO)),yes)
87 DEBUG_ENABLE=no 96 DEBUG_ENABLE=no