aboutsummaryrefslogtreecommitdiff
path: root/tmk_core
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/common.mk2
-rw-r--r--tmk_core/common/action.h10
2 files changed, 10 insertions, 2 deletions
diff --git a/tmk_core/common.mk b/tmk_core/common.mk
index 4d4272d26..3d0b83a01 100644
--- a/tmk_core/common.mk
+++ b/tmk_core/common.mk
@@ -162,8 +162,6 @@ ifeq ($(strip $(LINK_TIME_OPTIMIZATION_ENABLE)), yes)
162 endif 162 endif
163 EXTRAFLAGS += -flto 163 EXTRAFLAGS += -flto
164 TMK_COMMON_DEFS += -DLINK_TIME_OPTIMIZATION_ENABLE 164 TMK_COMMON_DEFS += -DLINK_TIME_OPTIMIZATION_ENABLE
165 TMK_COMMON_DEFS += -DNO_ACTION_MACRO
166 TMK_COMMON_DEFS += -DNO_ACTION_FUNCTION
167endif 165endif
168 166
169# Search Path 167# Search Path
diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h
index dd22023f9..c82c9c81b 100644
--- a/tmk_core/common/action.h
+++ b/tmk_core/common/action.h
@@ -28,6 +28,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
28extern "C" { 28extern "C" {
29#endif 29#endif
30 30
31/* Disable macro and function features when LTO is enabled, since they break */
32#ifdef LINK_TIME_OPTIMIZATION_ENABLE
33# ifndef NO_ACTION_MACRO
34# define NO_ACTION_MACRO
35# endif
36# ifndef NO_ACTION_FUNCTION
37# define NO_ACTION_FUNCTION
38# endif
39#endif
40
31/* tapping count and state */ 41/* tapping count and state */
32typedef struct { 42typedef struct {
33 bool interrupted : 1; 43 bool interrupted : 1;