0

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.

4

1 回答 1

2

如果您只需要构建 LLVM,您可以使用而不是生成NMake Makefiles和构建. 似乎某处存在引用问题(可能是 CMake、CmakeLists.txt、msbuild,谁知道)。nmakemsbuild

再想一想,这可能是环境变量的问题。你是如何设置 PATH 的?从新的“Visual Studio 开发人员命令提示符”尝试。

于 2014-02-17T16:14:56.383 回答