LLVM config files

I try compile parts LLVM sources by GCC. IS problem with include\llvm\Config\ directory where are files llvm-config.h.cmake and llvm-config.h.in instead llvm-config.h. How create *.h and *.def files?
How create *.h and *.def files?

On Linux you would usually run the configure script, as explained here:

Getting Started with the LLVM System
http://llvm.org/docs/GettingStarted.html

(this includes CYGWIN as well as Linux)

On Windows (apart from with CYGWIN) you need to use CMake

Building LLVM with CMake
http://llvm.org/docs/CMake.html

(CMake can also be used with Linux; note you'll have to track down the right compiler name to pass to CMake.)

Andy
Last edited on
Thanks! I download CMake, set compiler to GCC. CMake requirs Python - I install Python, but still is error:
CMake Error at CMakeLists.txt:308 (message):
Unexpected failure executing llvm-build: Traceback (most recent call last):

File "D:/llvm.src/llvm/utils/llvm-build/llvm-build", line 3, in <module>
import llvmbuild
File "D:\llvm.src\llvm\utils\llvm-build\llvmbuild\__init__.py", line 1, in <module>
from main import main

ImportError: No module named 'main'
in this same directory as __init__.py is main.py but is error
Error was because I had Python 3.x, but need Python 2.x
Last edited on
In case it helps, I've found some more succinct instructions. As CodeLite relies on Clang, they've provided instructions on how to build Clang here (for both Linux and Windows)
http://codelite.org/Developers/HomePage

(And they do state in the instructions that you need Python 2.7 and not 3.x, but you already learnt that's the case...)

I built a build for Windows using MinGW GCC 4.8.1 following pretty much the same sequence. I didn't hit the Python problem as I already had the right version of it installed, but I did hit the problem with off64_t not being defined, as reported here:

Unknown error when compiling Clang 3.3 with Mingw
http://stackoverflow.com/questions/18655941/unknown-error-when-compiling-clang-3-3-with-mingw

I fixed it by adding

#undef __STRICT_ANSI__

to the top of

...\llvm\tools\clang\tools\c-index-test\c-index-test.c

But that was my only problem with the build.

Andy

PS I've also hit the problem with Clang's slow startup speed on Windows. In case you also hit the problem, this post might be of interest to you.

Clang slow startup (using MinGW)
http://stackoverflow.com/questions/15310996/clang-slow-startup-using-mingw
Last edited on
Topic archived. No new replies allowed.