Cross platform configuration and compilation is tkaing very long (Xtensa on windows/linux)

We are trying to compile a code for Xtensa/Tensilica platform over windows or Linux.
The generator we are using is nmake and also tried ninja over windows and on linux we are using unix make files as generator. The time taken across these cases is too huge almost like 20minutes compared to configuring or generating over windows/linux which is done under max 2minutes.

Could you please help suggest what could be going wrong.