Skip to content

Commit

Permalink
core: Build option for LTO(Link Time Optimization)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmk committed May 31, 2022
1 parent 0e1aeaa commit 360872d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tmk_core/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ CFLAGS += -Wstrict-prototypes
CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
CFLAGS += $(CSTANDARD)
CFLAGS += -flto
ifdef CONFIG_H
CFLAGS += -include $(CONFIG_H)
endif
Expand Down Expand Up @@ -173,6 +174,7 @@ CPPFLAGS += -Wundef
CPPFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
#CPPFLAGS += $(CSTANDARD)
CPPFLAGS += -flto
ifdef CONFIG_H
CPPFLAGS += -include $(CONFIG_H)
endif
Expand All @@ -189,6 +191,7 @@ endif
# dump that will be displayed for a given single line of source input.
ASFLAGS = $(ADEFS) -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100
ASFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
ASFLAGS += -flto
ifdef CONFIG_H
ASFLAGS += -include $(CONFIG_H)
endif
Expand Down Expand Up @@ -261,6 +264,7 @@ LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)
#LDFLAGS += -T linker_script.x
# You can give EXTRALDFLAGS at 'make' command line.
LDFLAGS += $(EXTRALDFLAGS)
LDFLAGS += -flto



Expand Down

0 comments on commit 360872d

Please sign in to comment.