I\'d like to run the Microsoft Visual Studio Compiler cl.exe
without invoking the preprocessor. Is this possible? I thought that simply compiling preprocessed s
To my knowledge there is no way to run the compiler without the preprocessor (regardless of the fact that it doesn't do anything.
However seperating the 2 stages will obviously be slower as you are adding a write to file and then read back of that file. If it doesn't need to do those writes it can hold it in memory and you save a tonne of time waiting for the disk to be written to & read from.
ie Even if you could disable the pre-processor it would still be slower than running both stages simultaneously.
It may well be that a lot of the time you think the preprocessor is taking is actually time spent writing that large file to disk. The preprocessor should actually take a tiny percentage of the time that the rest of the compiler takes. A big benefit of a normal pre/compilation is that the the compiler can begin compiling while the preprocessor stage is still running, perhaps in a separate thread or as it detects new preprocessor output. The large preprocessor output may not need to ever occupy memory (let alone disk), as it's consumed and overwritten in smaller chunks.