mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-30 04:00:02 +02:00
[build] Enable LTO for the device
This commit is contained in:
committed by
LeaNumworks
parent
23b60ec345
commit
8264e3f1f8
@@ -5,11 +5,18 @@ GDB = arm-none-eabi-gdb
|
||||
OBJCOPY = arm-none-eabi-objcopy
|
||||
SIZE = arm-none-eabi-size
|
||||
|
||||
LTO=1
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
SFLAGS += -ggdb3
|
||||
else
|
||||
ifeq ($(LTO),1)
|
||||
SFLAGS += -flto
|
||||
else
|
||||
SFLAGS += -fdata-sections -ffunction-sections
|
||||
LDFLAGS += -Wl,--gc-sections
|
||||
endif
|
||||
endif
|
||||
|
||||
SFLAGS += -mthumb -march=armv7e-m -mfloat-abi=hard -mcpu=cortex-m4 -mfpu=fpv4-sp-d16
|
||||
LDFLAGS += $(SFLAGS) -lgcc -Wl,-T,$(LDSCRIPT)
|
||||
|
||||
Reference in New Issue
Block a user