aboutsummaryrefslogtreecommitdiff
path: root/platform.txt
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@arduino.cc>2016-06-16 13:05:24 +0200
committerCristian Maglie <c.maglie@arduino.cc>2016-07-25 12:49:07 +0200
commita4d4dfe95408b9a1e42dd660fd9d0fb38954ca35 (patch)
tree33ceda6afb5ad4eb9650db466e56ee9ed0ca95b7 /platform.txt
parent06868f4cd39a9dba82b5014d1208feb1e1f0d750 (diff)
Enable LTO
Diffstat (limited to 'platform.txt')
-rw-r--r--platform.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/platform.txt b/platform.txt
index 156f4df..432650e 100644
--- a/platform.txt
+++ b/platform.txt
@@ -20,13 +20,13 @@ compiler.warning_flags.all=-Wall -Wextra
# Default "compiler.path" is correct, change only if you want to override the initial value
compiler.path={runtime.tools.avr-gcc.path}/bin/
compiler.c.cmd=avr-gcc
-compiler.c.flags=-c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -MMD
-compiler.c.elf.flags={compiler.warning_flags} -Os -Wl,--gc-sections
+compiler.c.flags=-c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects
+compiler.c.elf.flags={compiler.warning_flags} -Os -Wl,--gc-sections -flto -fuse-linker-plugin
compiler.c.elf.cmd=avr-gcc
-compiler.S.flags=-c -g -x assembler-with-cpp
+compiler.S.flags=-c -g -x assembler-with-cpp -flto
compiler.cpp.cmd=avr-g++
-compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD
-compiler.ar.cmd=avr-ar
+compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto
+compiler.ar.cmd=avr-gcc-ar
compiler.ar.flags=rcs
compiler.objcopy.cmd=avr-objcopy
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0