gcc
and clang
are both known to be compiler drivers. As such, the gcc
executable does not compile anything itself. Rather, it calls the compiler (cc1
), assembler (as
) and linker (ld
) with the right flags as needed.
Is this setup true also for the Microsoft C compiler, cl.exe
? Is there actually some other executable that does the compilation? I assume that at least the assembling and linking are done by separate executables, since I know that ml.exe
(known as MASM) and link.exe
exist as separate executables, so cl.exe
probably calls them.
Best Answer
So the size of cl.exe is 158 KB. What do you think?
The rest of the MSVC C++ compiler is in various DLLs. The C/C++ compiler driver is officially cl.exe, but many of the driver functions are provided by MsBuild. Other executables include link.exe, lib.exe, ml.exe and bscmake.exe. You can't translate the archictecture or terminology blindly from one product set to another that is completely different.
However, if all you want to do is compile from the command line, cl.exe is the place to go. Details can be found here: https://stackoverflow.com/questions/7865432/command-line-compile-using-cl-exe.