Question

I've stumbled upon problems installing clang/LLVM on my Win 7 64-bit machine for setting up Emscripten in my Visual Studio 2010 Setup. I was following the official howto from Emscripten at https://github.com/kripken/emscripten/wiki/Using-Emscripten-on-Windows and stumbled into problems regarding the needed compilation of clang/LLVM.

svn co http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_32/final llvm

cd llvm\tools

svn co http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_32/final clang

cd ..\\..

mkdir build

cmake -G "Visual Studio 10" ..\llvm

msbuild LLVM.sln /p:Configuration=Release

The result is alot of errors similiar to this one:

CUSTOMBUILD : error : error reading '10.0\VC\bin\llvm\tools\clang\test\Index\ pch-opaque-value.cpp' [c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\b in\build\tools\clang\test\check-clang.vcxproj] CUSTOMBUILD : error : error reading '10.0\VC\bin\llvm\tools\clang\test\Index\ pch-with-errors.m' [c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\ build\tools\clang\test\check-clang.vcxproj]

Obviously, a path starting at '10.0\VC...' is totally invalid.. its missing the 'C:\Program Files (x86)\Microsoft Visual Studio ' in front.. (I've checked there is a file like that in test\Index\ - it is!

My question is: how do I fix that ? a) Can I setup an additional include path that is like 'C:\folder\MS Visual ' (including space) ?

What I have tried so far: a) Doing it from Visual Studio Prompt and normal Prompt. Using default and custom location. b) Running MSBUILD like

msbuild LLVM.sln /p:Configuration=Release /p:"VCBuildAdditionalOptions= C:\Program Files (x86)\Microsoft Visual Studio " c) Trying to change PATH/Systemroot.. Destroyed my systemroot in the meantime for unknown reasons (It complaimed about a wrong path like "C:\Program " and erased it obviously).

I am seriously stuck and dont know any further than these steps. Setting up an include path does not seem to help - though I'm wondering if the CMAKE stuff had problems with space's or what is going on.

Since the authors of Emscripten and probably LLVM call their windows support "experimental", I'm not the only one having troubles trying to set up LLVM/clang for later use with Visual Studio 2010 (not 2012..). I'm sorry for the bad formatting, for some reason SO won't allow me neat formatting today.. I'm using a nightly browser build though.

Was it helpful?

Solution

If you just need a build of LLVM, you can generate NMake Makefiles and build with nmake instead of msbuild. It seems that there is a quoting issue somewhere (might be CMake, CmakeLists.txt, msbuild, who knows).

On second thought, this might be a problem with environment variables. How did you set up PATH? Try from a new "Visual Studio Developer Command Prompt".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top