mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03:00
Stripping unused functions and data from compiled sketches (.hex files) using -ffunctions-sections, -fdata-sections, and -Wl,--gc-sections.
This commit is contained in:
@ -335,6 +335,8 @@ public class Library implements MessageConsumer{
|
||||
"-g",
|
||||
"-Os",
|
||||
"-Wall",
|
||||
"-ffunction-sections", // place each function in its own section
|
||||
"-fdata-sections",
|
||||
"-mmcu=" + Preferences.get("boards." + Preferences.get("board") + ".build.mcu"),
|
||||
"-DF_CPU=" + Preferences.get("boards." + Preferences.get("board") + ".build.f_cpu"),
|
||||
"-I" + libManager.getTarget().getPath(),
|
||||
@ -348,6 +350,8 @@ public class Library implements MessageConsumer{
|
||||
"-Os",
|
||||
"-Wall",
|
||||
"-fno-exceptions",
|
||||
"-ffunction-sections", // place each function in its own section
|
||||
"-fdata-sections",
|
||||
"-mmcu=" + Preferences.get("boards." + Preferences.get("board") + ".build.mcu"),
|
||||
"-DF_CPU=" + Preferences.get("boards." + Preferences.get("board") + ".build.f_cpu"),
|
||||
"-I" + libManager.getTarget().getPath(),
|
||||
|
Reference in New Issue
Block a user