[英]Is there a way to efficiently compile already preprocessed file with clang?
I got a preprocessed file with command: clang++ -E test.cc > test.E
Then I want to quickly compile it. 我得到了一个带有命令的预处理文件: clang++ -E test.cc > test.E
然后我想快速编译它。 To do it, I run clang++ -### -c test.cc
, then I take all those flags and just replace input file name from test.cc
to test.E
. 为此,我运行clang++ -### -c test.cc
,然后使用所有这些标志并将输入文件名从test.cc
为test.E
But I wonder, if there are some redundant flags in output of clang++ -###
for already preprocessed file, or may be there are some flags, that force clang to skip preprocessing or some other unnecessary steps. 但是我想知道,如果在clang++ -###
输出中已经预处理过的文件中存在一些多余的标志,或者可能存在一些标志,这会迫使clang跳过预处理或其他不必要的步骤。
The aim is to speed up the compilation of a preprocessed file. 目的是加快预处理文件的编译。
为了加快编译速度,我需要将标志的“ -x”参数替换为正确的语言,例如:“ c”->“ cpp-output”,“ c ++”->“ c ++-cpp-output”等。在这种情况下,clang根本不会运行预处理。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.