有相当于.spec文件Clang / LLVM和在哪里可以找到一个参考? [英] Is there an equivalent to .spec files for Clang/LLVM and where can I find a reference?

查看:230
本文介绍了有相当于.spec文件Clang / LLVM和在哪里可以找到一个参考?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

gcc 驱动程序可以配置为使用 .specs 来使用特定的链接器,特定的选项和其他细节code>档案。

The gcc driver can be configured to use a particular linker, particular options and other details (e.g. overriding system headers) using .specs files.

GCC(4.9.0)版本的目前(撰写本指南)手册在此处描述规格文件

The current (as of this writing) manual for version of GCC (4.9.0) describes the Spec Files here.

是否有类似的机制为Clang / LLVM。显然,Clang也有驱动程序的概念,但我无法提出任何有关规范文件或类似的机制存在Clang和如何使用它们。

Is there a similar mechanism for Clang/LLVM. Apparently Clang has the notion of a driver as well, but I was unable to come up with any documentation on whether Spec Files or a similar mechanism exist for Clang and how to use them.

我对C和C ++感兴趣,但可能是一个指针,他们会得到我开始。

I am interested in this for both C and C++, but probably a pointer to either of them will get me started.

目标是覆盖系统头文件和库路径以及前面简单提到的链接器。

Goal is to override the system header and library paths as well as the linker as briefly mentioned before.

推荐答案

根据文档,Clang驱动程序没有直接等同于GCC spec文件:

According to the docs, the Clang driver doesn't have a direct equivalent to GCC spec files:

clang驱动程序没有specs的直接对应,嵌入在specs中的大部分功能是在工具特定的参数翻译程序中。控制编译管道的specs部分通常是流水线阶段的一部分。 (来自 http://clang.llvm.org/docs/DriverInternals.html

"The clang driver has no direct correspondent for "specs". The majority of the functionality that is embedded in specs is in the Tool specific argument translation routines. The parts of specs which control the compilation pipeline are generally part of the Pipeline stage." (from http://clang.llvm.org/docs/DriverInternals.html)

#include搜索路径可以使用 -nostdinc -isystem

The #include search path can be overridden using -nostdinc and -isystem.

但是,我不知道如何覆盖链接器或完全覆盖库搜索路径。

However, I don't know how to override the linker or fully override the library search path.

这篇关于有相当于.spec文件Clang / LLVM和在哪里可以找到一个参考?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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