-
-
Notifications
You must be signed in to change notification settings - Fork 40.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to enable LTO easily #5674
Conversation
…ling errors with LTO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a warning about what you are disabling
I should probably add docs for this too.... |
Previously, the advice you gave was to add |
At the time, it was true. However, it's since been moved into it's own "feature" that is off by default, and only enabled if you add Also, the only reason I have it turning off the macros and functions is that enabling LTO can/will break those features. |
I see. FYI, there are also the following ways. tmk_core/common.mk: ifeq ($(strip $(LINK_TIME_OPTIMIZATION_ENABLE)), yes)
EXTRAFLAGS += -flto
POST_CONFIG_H += $(TMK_DIR)/post_config.h
TMK_COMMON_DEFS += -DLINK_TIME_OPTIMIZATION_ENABLE
endif tmk_core/post_config.h: #pragma once
#ifdef LINK_TIME_OPTIMIZATION_ENABLE
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
#ifdef LEADER_ENABLE
#error some error message
#endif
#endif |
@mtei That would definitely work. But there is no reason to disable Leader Keys here. In fact, I think doing so is a bad idea, actually. I think that we should use the "lightest touch" here, and not disable anything, unless it's needed (aka it's breaking something). |
OK, you are right. I do not know the relationship between LTO and LEADER_ENABLE. Just simply, if you need collision detection, just let you know that there is a way. |
Consider |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
* Add option to enable LTO easily and disable features that cause compiling errors with LTO * Add documentation about LTO option * Add to show_options
Add option to enable LTO easily (qmk#5674)
* Add option to enable LTO easily and disable features that cause compiling errors with LTO * Add documentation about LTO option * Add to show_options
* Add option to enable LTO easily and disable features that cause compiling errors with LTO * Add documentation about LTO option * Add to show_options
* Add option to enable LTO easily and disable features that cause compiling errors with LTO * Add documentation about LTO option * Add to show_options
* Add option to enable LTO easily and disable features that cause compiling errors with LTO * Add documentation about LTO option * Add to show_options
and disable features that cause compilation errors when LTO is enabled.
Added to
tmk_core/common.mk
rather thancommon_features.mk
, since it's not really a feature.