Вопрос

Similar to GCC, clang supports stopping at different stages when processing C/C++. For example, passing a -E flag causes it to stop after the pre-processor and -c stops before linking.

So far, I am aware of,

  1. -E : pre-processing
  2. -fsyntax-only : syntax checking
  3. -S : assembly
  4. -c : object code

Am I missing any stopping points between those, or is that it?

Это было полезно?

Решение

You can also use -S -emit-llvm to generate LLVM IR assembly files and just -emit-llvm for LLVM bitcode object files. These are the language-independent code representations that clang and other LLVM front-ends generate and pass to LLVM to compile into an executable.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top