Arm-none-eabi-as picks up the -Os option and fails

I include a library with mixed .c and .s files and get the error:

arm-none-eabi-as: unrecognised option ‘-Os’

when it tries to compile the assembly file.
Any way out ?

Thank you.

Try naming it as a .S file, not .s. PlatformIO will invoke different programs for it.