Testing the clang-cl integratio with VS2010

HI, I'm trying to do some tests with the clang-cl build found at http://llvm.org/builds/ with the VisualStudio 2010 compiler, and I get this error for any project or single file I tested.

1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(153,5): error MSB6006: "CL.exe" exited with code -1073741515.

Any clue on whats going on? I tried looking on the Bugzilla or google but found nothing.

Unai Landa
CTO
ulanda@digital-legends.com

Digital Legends Entertainment
C/ Bruc 50, 2-4
08010 Barcelona (Spain)
Tel : +34 93 394 17 77
Fax: +34 93 304 35 05
www.digital-legends.com

This e-mail message contains confidential information and/or legally privileged and is intended only for the use of the addressed person. Any disclosure, copying, distribution or the taking of any action in reliance on the contents of this e-mail by any other person is strictly prohibited. If you believe that this e-mail message has been sent to you by error, please notify the sender by reply via e-mail and then delete this message from your system. Thank you.

This is 0xc0000135, aka STATUS_DLL_NOT_FOUND.
http://msdn.microsoft.com/en-us/library/cc704588.aspx

clang-cl as distributed appears to have a few dll deps:

$ dumpbin /dependents C:/Program\ Files\ (x86)/LLVM\ 3.4.svn/msbuild-bin/cl.exe

KERNEL32.dll
SHELL32.dll
ADVAPI32.dll
MSVCP110.dll
MSVCR110.dll
dbghelp.dll

Looks like we have a dependence on the 2012 C and C++ runtimes. You can probably work around this by installing the VC++ 2012 redistributable bits from http://www.microsoft.com/en-us/download/details.aspx?id=30679 I think our users so far have had VS2012 installed, so nobody has noticed this.

We should eliminate that dependence with static linking or dll redistribution.

Hello,

Could you try this (unofficial) build and let me know if it works?

  http://clang.org/builds/clang-3.4a-win32.exe

I think the /MT change is good to upstream if so.

Alp.

Thanks Reid, that worked fine, but sadly clang-cl is not working for my code base, I get this errors even if I don’t use RTTI.

CL : error : cannot mangle RTTI descriptors for type ‘CPropTypeDirect’ yet
CL : error : cannot mangle the name of type ‘CPropTypeDirect’ into RTTI descriptors yet.

Unai Landa

CTO

ulanda@digital-legends.com

Digital Legends Entertainment
C/ Bruc 50, 2-4
08010 Barcelona (Spain)
Tel : +34 93 394 17 77
Fax: +34 93 304 35 05
www.digital-legends.com

This e-mail message contains confidential information and/or legally privileged and is intended only for the use of the addressed person. Any disclosure, copying, distribution or the taking of any action in reliance on the contents of this e-mail by any other person is strictly prohibited. If you believe that this e-mail message has been sent to you by error, please notify the sender by reply via e-mail and then delete this message from your system. Thank you.

Try "-GR-" to disable it.
Indeed, RTTI is not yet supported.

I tested and works fine, but I already installed the "recommended" run-times, so I can confirm if this would work without them.

About the RTTI problem I allready disabled RRTI, in fact this "command line options" work;

/I"../../../../dist/krm/inc/" /I"../../../../dist/3rdParty/" /I"../../../../dist/3rdParty/Glew/Include/" /I"../../../../krm/inc/" /I"../../../../krm/src/" /Zi /nologo /W0 /WX- /Od /Ob0 /Oy- /D "KRMCFG_GPU_OPENGL" /D "KRMCFG_MODE_DEBUG" /D "KRMCFG_CPU_X86" /D "KRMCFG_CPU_FLOAT" /D "KRMCFG_PLATFORM_WIN" /D "KRMCFG_PLATFORM_VERSION_WIN_32" /D "_UNICODE" /D "UNICODE" /GF /Gm /EHa /RTC1 /MDd /GS /arch:SSE2 /fp:fast /Zc:wchar_t /Zc:forScope /GR- /Fp"..\..\..\..\tmp\krm\code\sal\Win32_OGL_Debug\sal.pch" /Fa"..\..\..\..\tmp\krm\code\sal\Win32_OGL_Debug\" /Fo"..\..\..\..\tmp\krm\code\sal\Win32_OGL_Debug\\" /Fd"..\..\..\..\dist\krm\lib\sal\Win32_OGL_Debug\/sal.pdb" /Gd /wd"4996" /wd"4345" /analyze- /errorReport:queue

But if I switch to "final" configuration with this settings it fails:

/I"../../../../dist/krm/inc/" /I"../../../../dist/3rdParty/" /I"../../../../dist/3rdParty/Glew/Include/" /I"../../../../krm/inc/" /I"../../../../krm/src/" /Zi /nologo /W4 /WX- /Ox /Ob2 /Ot /Oy- /D "KRMCFG_GPU_OPENGL" /D "KRMCFG_MODE_FINAL" /D "KRMCFG_CPU_X86" /D "KRMCFG_CPU_FLOAT" /D "KRMCFG_PLATFORM_WIN" /D "KRMCFG_PLATFORM_VERSION_WIN_32" /D "_UNICODE" /D "UNICODE" /GF /Gm- /EHa /MD /GS /arch:SSE2 /fp:fast /Zc:wchar_t /Zc:forScope /GR- /Fp"..\..\..\..\tmp\krm\code\sal\Win32_OGL_Final\sal.pch" /Fa"..\..\..\..\tmp\krm\code\sal\Win32_OGL_Final\" /Fo"..\..\..\..\tmp\krm\code\sal\Win32_OGL_Final\\" /Fd"..\..\..\..\dist\krm\lib\sal\Win32_OGL_Final\/sal.pdb" /Gd /wd"4996" /wd"4345" /analyze- /errorReport:queue

SO I think there is some interactio with the optimization settings I enabled....

Also as a side note the /GT parameter (Enable fiber safe optimizations) fails.

Unai Landa
CTO
ulanda@digital-legends.com

Digital Legends Entertainment
C/ Bruc 50, 2-4
08010 Barcelona (Spain)
Tel : +34 93 394 17 77
Fax: +34 93 304 35 05
www.digital-legends.com

This e-mail message contains confidential information and/or legally privileged and is intended only for the use of the addressed person. Any disclosure, copying, distribution or the taking of any action in reliance on the contents of this e-mail by any other person is strictly prohibited. If you believe that this e-mail message has been sent to you by error, please notify the sender by reply via e-mail and then delete this message from your system. Thank you.

See 17403 – VS wrapper: "cannot mangle RTTI descriptors for type 'error_category'"