Add LTO and unused data/functions optimisations suggested by Arti
This commit is contained in:
parent
de62693b6d
commit
e6888bd251
7
Makefile
7
Makefile
@ -43,13 +43,18 @@ CFLAGS = -Wall \
|
|||||||
-Werror \
|
-Werror \
|
||||||
-Wfatal-errors \
|
-Wfatal-errors \
|
||||||
-Os \
|
-Os \
|
||||||
|
-flto \
|
||||||
|
-fdata-sections \
|
||||||
|
-ffunction-sections \
|
||||||
-mmcu=$(BOARD) \
|
-mmcu=$(BOARD) \
|
||||||
-DF_CPU=16000000UL \
|
-DF_CPU=16000000UL \
|
||||||
-DGIT_DESCR=\"$(shell git describe --abbrev=6 --dirty --always --tags --long)\" \
|
-DGIT_DESCR=\"$(shell git describe --abbrev=6 --dirty --always --tags --long)\" \
|
||||||
-std=c11
|
-std=c11
|
||||||
|
|
||||||
# Linker flags
|
# Linker flags
|
||||||
LDFLAGS = -mmcu=$(BOARD)
|
LDFLAGS = -mmcu=$(BOARD) \
|
||||||
|
-flto \
|
||||||
|
-Wl,-gc-sections
|
||||||
|
|
||||||
OBJCOPYARGS = -O ihex \
|
OBJCOPYARGS = -O ihex \
|
||||||
-R .eeprom
|
-R .eeprom
|
||||||
|
Loading…
Reference in New Issue
Block a user