Recent Changes - Search:

Home Page


Main

Downloads
Windows
macOS
Linux (via apt / rpm )
Linux wxWidgets
Release Notes

Wiki
Documentation
FAQ

Build CodeLite
Linux
Windows
macOS

Devs
Debug CodeLite Linux
Building Clang
Build wxWidgets (MSW)
Coding Guidelines
Create a Plugin

HomePage


Building CodeLite


If you are looking for how to build codelite, use the below links:

Building clang (Linux)


codelite uses libclang for its code completion engine. clang.so is provided in the codelite's source tree, however, these binaries may not be compatible with your own distro, in this case you will need to build one by yourself. In a more recent versions of codelite, liblldb (the LLVM based debugger) is also required

In this section I will cover how to build clang/lldb under Linux

Step 1: Getting the sources + compiling

  • You will need svn client installed, first you need to checkout llvm sources, followed by clang sources (let's assume that your current directory is set to /home/eran):

svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
cd llvm/tools/
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
svn co http://llvm.org/svn/llvm-project/lldb/trunk lldb

  • Building lldb also requires some extra packages. On Debian/Ubuntu, you can install them all by typing:

sudo apt-get install build-essential subversion swig python2.7-dev libedit-dev libncurses5-dev ninja-build

  • Its is recommend to perform the build outside the source tree:

Using CMake:


cd /home/eran/llvm
mkdir build-release
cd build-release
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release
ninja

When the compilation is over, locate libclang.so and copy it to its proper location /path/to/codelite/sdk/clang

Building clang (Windows)


Use CMake + MSYS to build clang:

Open MSYS shell and type:


cd /home/eran/llvm
mkdir build-release
cd build-release
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release ..
mingw32-make -j8

When the compilation is completed, copy libclang.dll to its proper location on codelite's tree

Building clang (OSX)


Building clang on OSX is similar to Linux with 1 minor change: on OSX, we will be using clang to build clang

First, checkout the sources:


cd /Users/eran
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
cd llvm/tools/
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang

Next, run cmake and build:


cd /Users/eran/llvm
mkdir build-release
cd build-release
cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_LIBCXX=1
ninja

Edit - History - Print - Recent Changes - Search
Page last modified on August 31, 2014, at 12:03 PM