PlatformIO Community

Compiler optimization level with espidf

I try to compile a espidf based project with Platformio 4.3.4.
Because it is getting real big i like to turn on compiler optimization.
With the compiledb command i saw that everything is compiled with -Og
Therefore i first use
buildtype = release
This had no effect, still -Og

Now my platformio.ini looks like this:

platform = espressif32
board = esp32doit-devkit-v1
framework = espidf
monitor_speed = 115200
monitor_filters = esp32_exception_decoder

build_flags = 
build_type = release

sadly, still everything is compiled with -Og, altough i set -Os as compiler option in platformio.ini
Hope somebody can give me a hint what i am doing wrong?


use build_unflags = -Og

Documentation here