Hi guys

I'm trying to compile Mesa with LLVM on Windows 7 (at work). We'd like to use it when running our software over remote desktop. The 32 bit build seems to work, but for some reason I can't get the 64 bit version to build. Any Mesa developers here that can lend me a hand? I'm able to build Mesa without LLVM support by running:
Code:
scons.bat build=release llvm=no machine=x86_64
but if I change llvm=no to llvm=yes I get lots of linker errors. I've built LLVM 3.0 from their git repository, and it should be build in release mode for x86_64. The Mesa I'm using is also from git (head/master).

The linker errors I get is
Code:
Installing build\windows-x86_64\bin\u_cache_test.exe ...
Installing build\windows-x86_64\bin\u_cache_test.pdb ...
link /nologo /LTCG /fixed:no /incremental:no /OUT:build\windows-x86_64\gallium\drivers\llvmpipe\lp_test_format.exe /LIBPATH:D:\mesa2\llvm_bin\lib build\windows-x86_64\gallium\drivers\llvmpipe\llvmpipe.lib build\windows-x86_64\gallium\auxiliary\gallium.lib LLVMObject.lib LLVMMCJIT.lib LLVMMCDisassemb
ler.lib LLVMLinker.lib LLVMipo.lib LLVMInterpreter.lib LLVMInstrumentation.lib LLVMJIT.lib LLVMExecutionEngine.lib LLVMBitWriter.lib LLVMX86Disassembler.lib LLVMX86AsmParser.lib LLVMMCParser.lib LLVMX86AsmPrinter.lib LLVMX86CodeGen.lib LLVMSelectionDAG.lib LLVMX86Utils.lib LLVMX86Info.lib LLVMAsmPri
nter.lib LLVMCodeGen.lib LLVMScalarOpts.lib LLVMInstCombine.lib LLVMTransformUtils.lib LLVMipa.lib LLVMAsmParser.lib LLVMArchive.lib LLVMBitReader.lib LLVMAnalysis.lib LLVMTarget.lib LLVMCore.lib LLVMMC.lib LLVMSupport.lib imagehlp.lib psapi.lib shell32.lib advapi32.lib /PDB:build\windows-x86_64\gal
lium\drivers\llvmpipe\lp_test_format.pdb /DEBUG build\windows-x86_64\gallium\drivers\llvmpipe\lp_test_format.obj build\windows-x86_64\gallium\drivers\llvmpipe\lp_test_main.obj
Installing build\windows-x86_64\bin\pipe_barrier_test.pdb ...
Installing build\windows-x86_64\bin\pipe_barrier_test.exe ...
link /nologo /LTCG /fixed:no /incremental:no /OUT:build\windows-x86_64\gallium\drivers\llvmpipe\lp_test_printf.exe /LIBPATH:D:\mesa2\llvm_bin\lib build\windows-x86_64\gallium\drivers\llvmpipe\llvmpipe.lib build\windows-x86_64\gallium\auxiliary\gallium.lib LLVMObject.lib LLVMMCJIT.lib LLVMMCDisassemb
ler.lib LLVMLinker.lib LLVMipo.lib LLVMInterpreter.lib LLVMInstrumentation.lib LLVMJIT.lib LLVMExecutionEngine.lib LLVMBitWriter.lib LLVMX86Disassembler.lib LLVMX86AsmParser.lib LLVMMCParser.lib LLVMX86AsmPrinter.lib LLVMX86CodeGen.lib LLVMSelectionDAG.lib LLVMX86Utils.lib LLVMX86Info.lib LLVMAsmPri
nter.lib LLVMCodeGen.lib LLVMScalarOpts.lib LLVMInstCombine.lib LLVMTransformUtils.lib LLVMipa.lib LLVMAsmParser.lib LLVMArchive.lib LLVMBitReader.lib LLVMAnalysis.lib LLVMTarget.lib LLVMCore.lib LLVMMC.lib LLVMSupport.lib imagehlp.lib psapi.lib shell32.lib advapi32.lib /PDB:build\windows-x86_64\gal
lium\drivers\llvmpipe\lp_test_printf.pdb /DEBUG build\windows-x86_64\gallium\drivers\llvmpipe\lp_test_printf.obj build\windows-x86_64\gallium\drivers\llvmpipe\lp_test_main.obj
msvcprt.lib(MSVCP100.dll) : error LNK2005: "void __cdecl std::_Xlength_error(char const *)" (?_Xlength_error@std@@YAXPEBD@Z) already defined in libcpmt.lib(xthrow.obj)
msvcprt.lib(MSVCP100.dll) : error LNK2005: "void __cdecl std::_Xout_of_range(char const *)" (?_Xout_of_range@std@@YAXPEBD@Z) already defined in libcpmt.lib(xthrow.obj)
msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: virtual __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::~basic_streambuf<char,struct std::char_traits<char> >(void)" (??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ) already defined in libcpmt.lib(cout.obj)
msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::basic_streambuf<char,struct std::char_traits<char> >(void)" (??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@XZ) already defined in libcpmt.lib(cout.obj)
msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: void __cdecl std::basic_ios<char,struct std::char_traits<char> >::setstate(int,bool)" (?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z) already defined in libcpmt.lib(cout.obj)
msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: char * __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::_Pninc(void)" (?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ) already defined in libcpmt.lib(cout.obj)
msvcprt.lib(MSVCP100.dll) : error LNK2005: "private: static void __cdecl std::ios_base::_Ios_base_dtor(class std::ios_base *)" (?_Ios_base_dtor@ios_base@std@@CAXPEAV12@@Z) already defined in libcpmt.lib(ios.obj)
msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: __cdecl std::basic_ostream<char,struct std::char_traits<char> >::basic_ostream<char,struct std::char_traits<char> >(class std::basic_streambuf<char,struct std::char_traits<char> > *,bool)" (??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?
$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z) already defined in libcpmt.lib(cout.obj)
msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: __cdecl std::basic_ios<char,struct std::char_traits<char> >::basic_ios<char,struct std::char_traits<char> >(void)" (??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ) already defined in libcpmt.lib(cout.obj)
msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: virtual __cdecl std::basic_ios<char,struct std::char_traits<char> >::~basic_ios<char,struct std::char_traits<char> >(void)" (??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ) already defined in libcpmt.lib(cout.obj)
msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: void __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::setg(char *,char *,char *)" (?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z) already defined in libcpmt.lib(cout.obj)
msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: __cdecl std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QEAA@XZ) already defined in libcpmt.lib(xlock.obj)
msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: __cdecl std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QEAA@H@Z) already defined in libcpmt.lib(xlock.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: _invoke_watson already defined in LIBCMT.lib(invarg.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: memmove already defined in LIBCMT.lib(memcpy.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: malloc already defined in LIBCMT.lib(malloc.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: free already defined in LIBCMT.lib(free.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: exit already defined in LIBCMT.lib(crt0dat.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: tolower already defined in LIBCMT.lib(tolower.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: isdigit already defined in LIBCMT.lib(_ctype.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: atoi already defined in LIBCMT.lib(atox.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: abort already defined in LIBCMT.lib(abort.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: getenv already defined in LIBCMT.lib(getenv.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: realloc already defined in LIBCMT.lib(realloc.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: strcspn already defined in LIBCMT.lib(strcspn.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: _errno already defined in LIBCMT.lib(dosmap.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: fclose already defined in LIBCMT.lib(fclose.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: fwrite already defined in LIBCMT.lib(fwrite.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: fopen already defined in LIBCMT.lib(fopen.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: isspace already defined in LIBCMT.lib(_ctype.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: strncmp already defined in LIBCMT.lib(strncmp.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: isprint already defined in LIBCMT.lib(_ctype.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: isalnum already defined in LIBCMT.lib(_ctype.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: isalpha already defined in LIBCMT.lib(_ctype.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: isupper already defined in LIBCMT.lib(_ctype.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: _stricmp already defined in LIBCMT.lib(stricmp.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: _strdup already defined in LIBCMT.lib(strdup.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: calloc already defined in LIBCMT.lib(calloc.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: strchr already defined in LIBCMT.lib(strchr.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: _exit already defined in LIBCMT.lib(crt0dat.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: fputs already defined in LIBCMT.lib(fputs.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: fprintf already defined in LIBCMT.lib(fprintf.obj)
MSVCRT.lib(MSVCR100.dll) : error LNK2005: __iob_func maslvrcepardty. ldiebf(iMnSeVdC Pi1n0 0L.IdBlClM)T .:l iebr(r_ofri lLeN.Ko2b0j0)5
:MSVCR T".vloiibd( M_S_VcCdRe1c0l0 .sdtldl:): _:X leernrgotrh _LeNrKr2o0r0(5c:h a_rg ecto_nosstf h*a)n"d l(e? _aXllreenagdtyh _deerfrionre@ds tidn@ @LYIABXCPMETB.Dl@iZb)( oaslfrienafdoy. odbejf)i
nedM SiVnC RlTi.blcipbm(tM.SlViCbR(1x0t0h.rdolwl.)o b:j )e
rromrs vLcNpKr2t0.0l5i:b (sMStVrCpPb1r0k0 .adllrle)a d:y  edrerfoirn eLdN Ki2n0 0L5I:B C"MvTo.ildi b_(_sctdrepcblr ks.todb:j:)_
XoMuStV_CoRfT_.rlainbg(eM(ScVhCaRr1 0c0o.ndsltl )* ):"  e(r?r_oXro uLtN_Ko2f0_0r5a:n g_es@esttmdo@d@eY AaXlPrEeBaDd@yZ )d eaflirneeadd yi nd eLfIiBnCeMdT .ilni bl(isbectpmmotd.el.iobb(jx)t
hrMoSwV.CoRbTj.)l
ib(MSVCR10m0s.vdclplr)t .:l iebr(rMoSrV CLPN1K0200.0d5l:l )_ f:i leernroo ra lLrNeKa2d0y0 5d:e f"mipsnuvebcdlp irictn:.  lLviIibBr(CtMMuSTaV.lCl Pi_1b_0(c0fd.iedlclelln )os .t:od b:ej:r)br
aosMriS cVL_CNsRKtT2r.0el0ai5mb:b(uMfS<V cC"hRva1or0i,0ds. td_rl_ulcc)dt e :cs lte drs:rt:odcr:h :aL_rNX_Klt2er0na0gi5tt:hs _<fecfrhlrauorsr>h(  c>ah:la:rr~e bacadosyni scdt_e sf*ti)rn"ee ad(m ?bi_unXf l<LecInhBgaCtrMh,T_s.etlrriruboc(rtf@ fsslttudds@:h@:.YcoAhbXajPr)E_
BtDr@MaZSi)Vt CsaR<lTcr.helaairdb>y(  M>dS(eVvfCoiRin1de0)d0" . id(nl? l?l)1i ?b:$c bpeamrstri.oclr_i sbLt(NrxKet2ah0mr0bo5uw:f. @o_DbcUjh?)s$
iczhema_srsv_ ctaprlrartie.talsdi@ybD (@dMseStfVdiC@nP@e1@d0s 0ti.dnd@ l@LlUI)EB AC:AM @TeX.rZlr)io bra( lcLrhNesKai2dz0ye0 .5do:eb fj"i)vn
oeiddM  Si_Vn_C cRldTie.bclclip bms(ttM.dSl:Vi:Cb_R(X1co0ou0ut.t_d.oloflb_)jr )a:
...
...
...
More weird output (I think several threads are writing to standard output at the same time).
...
...
...
eeng.ll.ilbi(bX(8e6gSluabptia.rogbejt). o:b jw)a r:n ienrgr oLrN KL4N1K9270:0 1e:x puonrrte s'oelgvleIdn ietxitaelrinzael'  ssypmebcoilf i"ebdo omlu l_t_icpdleec lt ilmlevsm;: :uXs8i6n_gM Cf:i:rGsett CsppueIcDiAfnidcIantfioo(nu
nesgilg.nleidb (iengtl,aupnis.iogbnje)d  :i nwta r*n,iunngs iLgNnKe4d1 9i7n:t  e*x,puonrsti g'neegdl GienttD i*s,pulnasyi'g nsepde ciinfti e*d) "m u(l?tGieptlCep utIiDmAensd;I nufsoi@nXg8 6f_iMrCs@tl lsvpme@c@iYfAi_cNaItPiEoAnI
000@Z)
build\windows-x86_64\gallium\drivers\llvmpipe\lp_test_format.exe : fatal error LNK1120: 11 unresolved externals
scons: *** [build\windows-x86_64\gallium\drivers\llvmpipe\lp_test_format.exe] Error 1120
   Creating library build\windows-x86_64\gallium\targets\egl-static\libEGL.lib and object build\windows-x86_64\gallium\targets\egl-static\libEGL.exp
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
gallium.lib(lp_bld_init.obj) : error LNK2001: unresolved external symbol LLVMInitializeX86TargetMC
LLVMX86CodeGen.lib(X86InstrInfo.obj) : error LNK2001: unresolved external symbol "class llvm::MCInstrDesc * llvm::X86Insts" (?X86Insts@llvm@@3PAVMCInstrDesc@1@A)
LLVMX86CodeGen.lib(X86RegisterInfo.obj) : error LNK2001: unresolved external symbol "class llvm::MCRegisterClass * llvm::X86MCRegisterClasses" (?X86MCRegisterClasses@llvm@@3PAVMCRegisterClass@1@A)
LLVMX86CodeGen.lib(X86RegisterInfo.obj) : error LNK2001: unresolved external symbol "unsigned int __cdecl llvm::X86_MC::getX86RegNum(unsigned int)" (?getX86RegNum@X86_MC@llvm@@YAII@Z)
LLVMX86CodeGen.lib(X86CodeEmitter.obj) : error LNK2001: unresolved external symbol "unsigned int __cdecl llvm::X86_MC::getX86RegNum(unsigned int)" (?getX86RegNum@X86_MC@llvm@@YAII@Z)
LLVMX86CodeGen.lib(X86ISelLowering.obj) : error LNK2001: unresolved external symbol "unsigned int __cdecl llvm::X86_MC::getX86RegNum(unsigned int)" (?getX86RegNum@X86_MC@llvm@@YAII@Z)
LLVMX86CodeGen.lib(X86RegisterInfo.obj) : error LNK2001: unresolved external symbol "struct llvm::MCRegisterDesc * llvm::X86RegDesc" (?X86RegDesc@llvm@@3PAUMCRegisterDesc@1@A)
LLVMX86CodeGen.lib(X86RegisterInfo.obj) : error LNK2001: unresolved external symbol "void __cdecl llvm::X86_MC::InitLLVM2SEHRegisterMapping(class llvm::MCRegisterInfo *)" (?InitLLVM2SEHRegisterMapping@X86_MC@llvm@@YAXPEAVMCRegisterInfo@2@@Z)
LLVMX86CodeGen.lib(X86RegisterInfo.obj) : error LNK2001: unresolved external symbol "unsigned int __cdecl llvm::X86_MC::getDwarfRegFlavour(class llvm::StringRef,bool)" (?getDwarfRegFlavour@X86_MC@llvm@@YAIVStringRef@2@_N@Z)
LLVMX86CodeGen.lib(X86Subtarget.obj) : error LNK2001: unresolved external symbol "struct llvm::SubtargetFeatureKV * llvm::X86FeatureKV" (?X86FeatureKV@llvm@@3PAUSubtargetFeatureKV@1@A)
LLVMX86CodeGen.lib(X86Subtarget.obj) : error LNK2001: unresolved external symbol "struct llvm::SubtargetFeatureKV * llvm::X86SubTypeKV" (?X86SubTypeKV@llvm@@3PAUSubtargetFeatureKV@1@A)
LLVMX86CodeGen.lib(X86Subtarget.obj) : error LNK2001: unresolved external symbol "void __cdecl llvm::X86_MC::DetectFamilyModel(unsigned int,unsigned int &,unsigned int &)" (?DetectFamilyModel@X86_MC@llvm@@YAXIAEAI0@Z)
LLVMX86CodeGen.lib(X86Subtarget.obj) : error LNK2001: unresolved external symbol "bool __cdecl llvm::X86_MC::GetCpuIDAndInfo(unsigned int,unsigned int *,unsigned int *,unsigned int *,unsigned int *)" (?GetCpuIDAndInfo@X86_MC@llvm@@YA_NIPEAI000@Z)
build\windows-x86_64\gallium\targets\egl-static\libEGL.dll : fatal error LNK1120: 11 unresolved externals
scons: *** [build\windows-x86_64\gallium\targets\egl-static\libEGL.dll] Error 1120
Finished generating code
Finished generating code
scons: building terminated because of errors.