Domanda

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?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top