diff options
| author | Ayke van Laethem | 2017-10-24 03:29:19 +0200 |
|---|---|---|
| committer | Damien George | 2018-07-18 17:12:25 +1000 |
| commit | 4838b398afa9a6124224caf811ff5b83610777a1 (patch) | |
| tree | 93d5425058588633b47bee269fb32a0781d2a593 /ports/nrf/Makefile | |
| parent | 4e083819f323cbadc429bcd81ed20344292382fb (diff) | |
nrf: Enable Link-time optimizations
Diffstat (limited to 'ports/nrf/Makefile')
| -rw-r--r-- | ports/nrf/Makefile | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile index ca22e093c..4d0ca70b8 100644 --- a/ports/nrf/Makefile +++ b/ports/nrf/Makefile @@ -74,14 +74,13 @@ CFLAGS += $(CFLAGS_MCU_$(MCU_SERIES)) CFLAGS += $(INC) -Wall -Werror -ansi -std=gnu99 -nostdlib $(COPT) $(NRF_DEFINES) $(CFLAGS_MOD) CFLAGS += -fno-strict-aliasing CFLAGS += -fstack-usage -CFLAGS += -fdata-sections -ffunction-sections CFLAGS += -Iboards/$(BOARD) CFLAGS += -DNRF5_HAL_H='<$(MCU_VARIANT)_hal.h>' +CFLAGS += -flto LDFLAGS = $(CFLAGS) LDFLAGS += -Xlinker -Map=$(@:.elf=.map) LDFLAGS += -mthumb -mabi=aapcs -T $(LD_FILE) -L boards/ -LDFLAGS += -Wl,--gc-sections #Debugging/Optimization ifeq ($(DEBUG), 1) |
