Optimization in CircleCI not working


In order to my project to run efficiently I must compile it with O3 optimization. This works fine when i build it locally on my VS but the binary is not optimized when I build it with the CircleCI.
I run the compilation from the same .ini file as follows:

platform = ststm32
board = bluepill_f103c8_128k
framework = arduino
upload_port = /dev/ttyUSB*
upload_protocol = serial
lib_extra_dirs = …/libs
build_flags = -O3
build_unflags = -Os

Any thoughts what I am doing wrong would be appreciated.

Ok , so apparently the difference was caused since my STM32 version locally was older (5.7). CircleCI did compile it to O3.