diff options
author | Florian Didron <fdidron@users.noreply.github.com> | 2019-05-06 10:32:42 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-06 10:32:42 +0900 |
commit | 43aae47b383fe2490112d5ee9180d6978ff2a177 (patch) | |
tree | 32b1a8591ee87789623ea923bfaeaf8914988e6f /tmk_core | |
parent | 3c5dd583e13485b840fd88e54453ea69757871c4 (diff) | |
parent | c7d9b48cc92a046e62df2e7e5f6dfb1b833c8ad7 (diff) |
Merge pull request #44 from zsa/enable_lto_option
Add option to enable LTO easily (#5674)
Diffstat (limited to 'tmk_core')
-rw-r--r-- | tmk_core/common.mk | 7 |
1 files changed, 7 insertions, 0 deletions
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) |