|
|
Home » Developing U++ » UppHub » Upp package binding for LLVM/Clang library (libclang)
Re: Upp package binding for LLVM/Clang library (libclang) [message #30322 is a reply to message #30312] |
Fri, 24 December 2010 17:05   |
Sender Ghost
Messages: 301 Registered: November 2008
|
Senior Member |
|
|
How to build and install LLVM/Clang on Windows:
I will describe how to install it using GCC compiler.
You need to download and install following software first:
- CMake build system from http://www.cmake.org.
- TDM GCC compiler from http://www.tdm-gcc.tdragon.net, Nuwen GCC compiler from http://nuwen.net or MinGW GCC compiler from http://www.mingw.org.
- Python from http://www.python.org.
- SVN command line client from http://www.sliksvn.com or http://subversion.tigris.org.
Then download "BuildSystem_v3.4.zip" archive from attachments and extract it to "C:\BuildSystem" directory, for example.
Next, you need to edit "_start_here.bat" file for "System configurable settings" section for current paths of installed software. After running it, you will see command prompt.
First of you need to checkout sources from svn repository for particular version:
Toggle versions- Run "checkout.bat" to check out current (development) version.
- Run "checkout_2_8.bat" to check out 2.8 release version.
- Run "checkout_2_9.bat" to check out 2.9 release version.
- Run "checkout_3_0.bat" to check out 3.0 release version.
- Run "checkout_3_1.bat" to check out 3.1 release version.
- Run "checkout_3_2.bat" to check out 3.2 release version.
- Run "checkout_3_3.bat" to check out 3.3 release version.
- Run "checkout_3_4.bat" to check out 3.4 release version.
For example, you run "checkout_3_4.bat" first.
Then you can build and install LLVM/Clang for selected version:
Toggle versions- Run "build.bat" to build current (development) version.
- Run "build_2_8.bat" to build 2.8 release version.
- Run "build_2_9.bat" to build 2.9 release version.
- Run "build_3_0.bat" to build 3.0 release version.
- Run "build_3_1.bat" to build 3.1 release version.
- Run "build_3_2.bat" to build 3.2 release version.
- Run "build_3_3.bat" to build 3.3 release version.
- Run "build_3_4.bat" to build 3.4 release version.
For example, you run "build_3_4.bat" second.
If selected batch files runs without errors, then inside build and install directories you will see llvm directories for selected versions.
To update current development sources to latest versions you could run "update.bat" file when needed and start to build them from second step.
Note:
You need to run batch files inside command prompt after running "_start_here.bat" file.
How to configure installed LLVM/Clang on Windows for TheIDE:
Assuming you did previous steps to install 3.4 release version.
1. Start TheIDE.
2. Open "Setup->Build Methods.." menu.
3. Press insert key on the keyboard to add new build method and name it "LLVM34_MinGW".
4. Select GCC builder.
5. Add following directories for selected tabs:
PATH - executable directories:
C:\MinGW\bin
C:\BuildSystem\install\llvm_3_4\bin
INCLUDE directories:
C:\MinGW\include
C:\BuildSystem\install\llvm_3_4\include
LIB directories:
C:\MinGW\lib
C:\BuildSystem\install\llvm_3_4\lib
6. Use "LLVM34_MinGW" build method to build software relative to LLVM 3.4 version.
To use Upp package binding (ClangBase) with Clang library you need to check "C:\BuildSystem\install\llvm_3_4\lib" for "liblibclang.dll.a" and "liblibclang.dll" files. Else you need to find them inside "C:\BuildSystem\build\llvm_3_3" directories (e.g. bin and lib) and place them respectively.
If you compile shared (or static on Windows) version of ClangBase package, then you need to place "liblibclang.dll" file into "%windir%\system32" directory or near executable file. Else you could configure %PATH% environment variable to directory with "liblibclang.dll" file. Starting from 3.1 version, the "liblibclang.dll" file installed to bin directory, therefore you could extend LIB directories with:
C:\BuildSystem\install\llvm_3_4\bin
To note: the shared library for 2.9 release version is "libclang.dll".
Tested for CMake v2.8.12, Nuwen GCC v4.8.1, Python v2.7.5, Slik SVN v1.7.10.
[Updated on: Fri, 14 February 2014 15:33] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun Aug 24 14:14:34 CEST 2025
Total time taken to generate the page: 0.04028 seconds
|
|
|