clang -cc1选项是什么? [英] What does the clang -cc1 option do?

查看:409
本文介绍了clang -cc1选项是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 clang 的新手。我已经阅读了一篇关于源码从 cuda 使用 clang 编译器前端。

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

任何人都能告诉我为什么有时使用 -cc1

Can anyone tell me why the option -cc1 is sometimes used? Any help would be really appreciated as this may be very basic question.

谢谢

推荐答案

Clang编译器前端有几个额外的Clang特定功能,它们不通过GCC兼容性驱动程序接口公开。 -cc1 参数指示将使用编译器前端,而不是驱动程序。 clang -cc1 功能实现核心编译器功能。

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.

简单来说。如果你不给 -cc1 ,那么你可以期待标准GCC的外观和感觉。这是绝大多数编译器标志工作,就像你希望他们使用GCC。如果你通过选项-cc1,那么你得到Clang编译器标志设置。因此,GCC可能有所不同。

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.

希望这会更清楚一些。

这篇关于clang -cc1选项是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆