diff --git a/makefiles/arch/cortexm.inc.mk b/makefiles/arch/cortexm.inc.mk index 2751389fad25e..3996679c36906 100644 --- a/makefiles/arch/cortexm.inc.mk +++ b/makefiles/arch/cortexm.inc.mk @@ -8,6 +8,9 @@ TARGET_ARCH ?= arm-none-eabi # define build specific options CFLAGS_CPU = -mcpu=$(MCPU) -mlittle-endian -mthumb $(CFLAGS_FPU) +# enable LTO by default +LTO ?= 1 + ifneq (llvm,$(TOOLCHAIN)) # Clang (observed with v3.7) does not understand -mno-thumb-interwork, only add if # not building with LLVM