compiler version from keil Studio Cloud to Mbed Studio

Hello,

I have an old project using Multitech's xdot and mbed5. I can compile it in Keil Studio Cloud, but I can't compile it in Mbed Studio (local). The Multitech mbed5 library has a problem with Mbed Studio's ARM compiler. I switched to GCC but the flash memory size is too large. if I migrate the project to mbed6, I think that the size will be too much because Mbed6 requires more flash that Mbed5 and it is laborious.

Can I use the same compiler in Mbed Studio as Keil Studio Cloud? What is the correct version and how do I install it?

Thanks!