build: limit inlining in every file of the debug build

At -Og GCC only caps inlining growth in units over large-unit-insns
(10000 instructions). Smaller files inline ArduinoJson's helpers into
every caller: moving the JSON parsing out of Somfy.cpp grew the image by
19 KB, past the 1.5 MB app partition. Treating every file as large keeps
inlining at the level the big files already had and frees 13 KB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cjkas 2026-10-13 20:27:49 +02:00
parent bbfb23e972
commit 4cb676a7a7

View file

@ -64,7 +64,12 @@ extends = esp32
board = esp32dev board = esp32dev
build_type = debug build_type = debug
board_build.partitions = esp32_3MB.csv board_build.partitions = esp32_3MB.csv
build_flags = ${dualcore.build_flags} ; -Og only limits inlining in units over large-unit-insns (10000 by default).
; Smaller files inline ArduinoJson's helpers into every caller, which costs
; KBs of flash per file, so treat every file as large.
build_flags =
${dualcore.build_flags}
--param=large-unit-insns=1000
[env:esp32c3] [env:esp32c3]
extends = esp32 extends = esp32