[cfe-dev] clang on WinXP + MinGW

David Chisnall csdavec at swan.ac.uk
Tue Mar 13 11:43:32 PDT 2012


On 13 Mar 2012, at 17:50, Jason Sachs wrote:

> C:\appl\llvm\2.9\clang\bin>clang -I c:\appl\mingw\20111118\include
> test.cpp -emit-llvm
> clang: error:
>      'i386-pc-mingw32':
>      unable
>      to
>      pass
>      LLVM
>      bit-code
>      files
>      to
>      linker

This error happens because you are telling clang to compile, link, and produce an executable, but you are also telling it to emit LLVM bitcode.  These two options are incompatible.  If you want bitcode, you should add -c.  If you want LLVM assembly, you should use -S.  If you want a binary, then you should not use -emit-llvm.

David



More information about the cfe-dev mailing list