[LLVMdev] Getting started (Windows)

Adrian Boeing aboeing at gmail.com
Sat May 30 02:38:49 PDT 2009

Hi Duncan,

Thanks for the reply, that did indeed work.

I realise that I could use llvm-gcc but I want to learn how to use the
parts of llvm that would allow me to make my own compiler
(eventually), also at this point I'm trying to avoid having to build
all of llvm myself and just use what is available pre-built from the

I was wondering how to actually create the exe?

For example with gcc:
gcc hello.c -S -o hello_gcc.s
produces a native assembly file
and then
gcc hello_gcc.s -o hello_gcc_asm.exe
will produce the final "hello world" I can run.

With llvm, I've done:
hello.c to hello.ll via the online LLVM compiler tool
llvm-as hello.ll
to create the hello.bc, then
llc hello.bc
to create the hello.s

but if I try and create an exe from this assembly file with gcc I get
a number of errors,
Likewise, "cl.exe" (microsoft compiler) says "cl : Command line
warning D9024 : unrecognized source file type 'hello.s', object file

PS: Including a link to this: "http://llvm.org/cmds/" in the mingw
distribution would probably help other people get up and running

More information about the llvm-dev mailing list