how the IDE calls compilers

Hi,

Some compilers can use multicore PC processors when the make calls them with the -j option. This makes compilation much faster. Can the Arduino IDE be made to insert this option?

Thanks!

-j is a make flag, not a compiler flag. make will run multiple compilers, if it can.

Given how small embedded files are and how optimized avr-gcc is, I'm not sure you'd see a significant difference with multiple files being compiled simultaneously. You aren't compiling a linux kernel.

The linker (and everything after it) only runs once anyway and the "compile/upload" time is almost entirely dominated by the upload time anyway.

mbeach:
Can the Arduino IDE be made to insert this option?

There isn't any code in Arduino to do this, but of course the entire IDE code is open source, so in theory anyone could add the code.

I have actually considered doing this....

One tough problem is how to detect the number of simultaneous compiler jobs that should be run. Even if a computer has a dual or quad core processor doesn't necessarily mean it has enough non-vitual RAM (after Arduino/Java's considerable memory use) or a fast enough disk. On underpowered PC, running 2 or more at the same time could be much, much slower.