How does the build process in Arduino IDE work for ESP8266
Does it uses same for compiling programs for esp8266 ?.


No. It uses xtensa-lx106-elf-gcc. The compiler has to match the architecture.

Most of the build "process" (as in the actions that are taken) is the same, but executables specific to the EXP8266's XTensa core are used. There's also a few extra things in there, like building the (optional) SPIFFS image, etc.