A cross compiler is used to generate executable code for a platform different from the one it runs on.