"gcc compatible driver" internals

Hi all,

I'm trying to understand how does Clang driver work when executed in "gcc compatible mode".
More specifically, I'm interested where CompilerInstance is created when Clang (not GCC or
some other compiler) is actually used for compilation.

After investigation I've come to conclusion that "clang" executable should call itself once again
as external process, this time in cc1 mode. Is it really so?

The clang driver accumulates various options and builds a list of each
input. For each input, it will invoke either the external tool for
handling it (e.g. the assembler for -no-integrated-as or the linker) or
itself (with -cc1 etc). It passes down the relevant variables as needed.
You can get the details by adding -v to the command line.