Code fails to compile after adding -u _printf_float to build_flags

I have a sketch that uses sprintf(...) with double values. After reading this question, and adding -u_printf_float to the project’s build_flags, nothing happened: the places where sprintf(...) is called with double values result in ? at the output. The compiled program did not change in size, either.

I then tried adding a space to the flag: -u _printf_float and that gave me a bunch of include errors, which seem to indicate that PlatformIO can’t (as a result of the flag being added) figure out what the target board is (?).

The build target is an Elegoo-branded Mega2560.

platformio.ini

; [default PlatformIO comment]
[env:megaatmega2560]
platform = atmelavr
board = megaatmega2560
framework = arduino
lib_deps = 
	olikraus/U8g2@^2.36.5
	mike-matera/ArduinoSTL@^1.3.3

build_flags=
	-u _printf_float

The error log (from building with -u _printf_float) was too long to include here. I have uploaded it to a text-sharing website, but the link expires tomorrow. If you need to read it later and/or there is a better way of sharing the log, please let me know.