質問

I got a preprocessed file with command: clang++ -E test.cc > test.E Then I want to quickly compile it. 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.

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.

The aim is to speed up the compilation of a preprocessed file.

役に立ちましたか?

解決

To speed-up compilation I need to replace the flag's "-x" argument to the proper language, like: "c" -> "cpp-output", "c++" -> "c++-cpp-output", etc. In this case clang won't run preprocessing at all.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top