I have been working with PlatformIO for ESP8266 coding over a year. Last month, I tried to enable IPv6 supported with the latest espressif8266 platform, the latest version is V2.0.4.
It works fine, but one problem is the flash available space for sketch uploading.
the previous version which does to support IPv6, the available space is about 9xxKB.
now, it is 7XXKB.
And my sketch compiling size is about 385KB. It is over 50% than available space which cause my http OTA function failed.
below is the content of ini file, and terminal info of compiling

I tried many ways to reduce the sketch size, but performance is not good enough.
last week, I tried to move the exactly same code to Arduino IDE, and compile it.
the system show me available space of storage space is about 1MB, and with the similar compiling sketch size, the percentage is dropped to 37%.
and I tested it, all functions work fine. please see below Arduino setting and info.
the version shows in board manager is V2.5.0

Simply merging to TWO build_flags statements in platformio.ini so that the second did not cancel out the first fixed it for me using the platformio.ini you provided. No editing of the board configuration file (making it susceptible to not working in the future with an update) is not necessary.

Please note that we do real computation of available flash based on the regions in LD script. Arduino IDE does not do that and show the same available flash size even if you switch to another LD script. See source codegithub.com