[LLVMdev] Compiler driver

Mikhail Glushenkov foldr at codedgers.com
Thu Dec 17 21:01:38 PST 2009

Hi Mark,

Mark Muir <mark.i.r.muir <at> gmail.com> writes:

> I want to be able to package this compiler as a cross-compiler
> - a single binary to go from C to assembly for that target. It
> should define a macro (as shown above) to allow the target to
> be identified by source code. I was thinking of doing this
> using llvmc to capture the above command-line. Is that the
> recommended approach?

Yes, llvmc is probably what you need. It was successfully used to
create a driver for the PIC16 toolchain. Look at llvmc docs and
tools/llvmc/examples/mcc16, this should get you started. If you
have any further questions, mail me.

> What's the difference between 'clang' and a custom driver built
> using 'llvmc'?

The clang driver is developed separately from llvmc.

More information about the llvm-dev mailing list