Ok, found the difference, it is also described here:
With lib_archive = false both linkages result in working program. IMHO, since the interrupt handlers are very frequently defined with weak substitutes, the default archiving of the /lib folder resulted in two weeks of frustration with platformio for me. It is not same for other conventional tools. I think the default decision is wrong, and the tool should default to false always. If the developer knows what they are doing, they may explicitly alter the default. And it should be spelled in bold in “Beware” section.
Now the library generation appears to have no *.a generation.