What does the clang -cc1 option do?

后端 未结 2 1806
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-30 20:51

I\'m a newbie in clang. I have read a paper about source to source transformation from cuda to opencl using clang compiler fr

2条回答
  •  半阙折子戏
    2021-01-30 20:58

    The usual compiler consists of so-called compiler driver, which knows how to execute compiler itself, assembler, linker, etc. and compiler itself which just takes the source code (sometimes already preprocessed) and emit assembler/object code.

    Clang implements all these components in the single binary, the difference is just the cmdline. Here clang -cc1 invokes the compiler itself with its internal/undocumented set of options, etc.

提交回复
热议问题