Apparently, it is the same issue as described here:
Maybe the"lib_archive = false" does not apply in debug mode?
There is also this at the end of compilation:
“arm-none-eabi-gcc-ar rc .pio\build\bluepill_f103c8\libFrameworkLibOpenCM3.a”
or: “Archiving .pio\build\bluepill_f103c8\libFrameworkLibOpenCM3.a”.
However, same is in the release build. I am lost now.