Doing some experimentation with the link time optimization (-flto, --lto), I reached a point where I want to change the compile options for some unrelated files.
How does one change the compile options for single files in mbed Studio?
If you really need per-file flags, you might make progress by switching to the Mbed CLI 2 tools and use CMake to build: https://os.mbed.com/docs/mbed-os/v6.15/build-tools/use.html
Then modify one of the CMakeLists.txt files to include your flags. You would need to run the mbed CLI build from the terminal rather than with Studio’s built-in build button for this.