[cfe-dev] Why clang needs to fork into itself?

Yuri yuri at rawbw.com
Mon Jan 27 12:02:27 PST 2014


I noticed that even the simple command 'clang -c -emit-llvm c.cpp' calls 
fork, and forks into itself.
Why does it need to do this? This would potentially complicate 
profiling, debugging, etc. All tools should be fork-aware.
Also unnecessary operation must cause some performance hit.

It is understandable when compiler would, for example, fork into an 
external macro preprocessor, or assembler, or linker, but why into itself?

Yuri



More information about the cfe-dev mailing list