What does the clang -cc1 option do?

后端 未结 2 1759
爱一瞬间的悲伤
爱一瞬间的悲伤 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 21:19

    The Clang compiler front-end has several additional Clang specific features which are not exposed through the GCC compatibility driver interface. The -cc1 argument indicates that the compiler front-end is to be used, and not the driver. The clang -cc1 functionality implements the core compiler functionality.

    So, simply speaking. If you do not give -cc1 then you can expect the "look&feel" of standard GCC. That is the vast majority of compiler flags work just like you would expect them to work with GCC. If you pass the option "-cc1" then you get the Clang compiler flag set. Thus, there might be differences to GCC.

    Hope that makes it a little clearer.

提交回复
热议问题