Sign in to follow this  
Eliad Moshe

Build LLVM from source

Recommended Posts

Eliad Moshe    862

Dear Friends,

 

I am trying to build LLVM for msvc, by following the tutorial at the LLVM documentation-> http://llvm.org/docs/GettingStartedVS.html.

 

I installed Python 2.7.3 and already have CMake, although I am not sure about the "GnuWin32 tools" part.

 

Should I install the Automated gnuwin32 download tool ? 

 

 

"If you would like to run the LLVM tests you will need Python. Versions 2.4-2.7 are known to work. You will need GnuWin32 tools, too."

Are those a must for the build process? 

 

 

Share this post


Link to post
Share on other sites
Hiwas    5807

Last time I built LLVM it was pretty simple and I didn't need any additional items on Windows.  Python and the Gnu tools are only used for running tests on the LLVM codebase which you likely won't care about unless you intend to actually hack on LLVM itself.

Share this post


Link to post
Share on other sites
Eliad Moshe    862

Thanks AllEightUp! 

 

To sum this up:

 

 

0. Read the "Getting Started with the LLVM System using Microsoft Visual Studio".

3. Download & unzip the llvm source.

4. Install Python 2.7.x (I installed 2.7.3) + GnuWin32 tools. // Optional.

5. Install CMake and ->

{

6. Browse to the llvm source.

7. Browse to a location where you want the msvc projects to be found.

8. Configure CMAKE_INSTALL_PREFIX to the preferred directory where the headers, libs and other useful things should be installed.

}

9. Build the INSTALL project.

10. Locate the cool stuff at the directory specified at stage 8.

11. Start coding for great good! // smile.png

Edited by Eliad Moshe

Share this post


Link to post
Share on other sites
Hiwas    5807

Thanks AllEightUp! 

 

To sum this up:

 

 

0. Read the "Getting Started with the LLVM System using Microsoft Visual Studio".

3. Download & unzip the llvm source.

4. Install Python 2.7.x (I installed 2.7.3) + GnuWin32 tools. // Optional.

5. Install CMake and ->

{

6. Browse to the llvm source.

7. Browse to a location where you want the msvc projects to be found.

8. Configure CMAKE_INSTALL_PREFIX to the preferred directory where the headers, libs and other useful things should be installed.

}

9. Build the INSTALL project.

10. Locate the cool stuff at the directory specified at stage 8.

11. Start coding for great good! // smile.png

Hah, actually I'd never seen that particular article before.  I just saw "CMakeLists.txt" and said, "woot", generated a VC solution using CMake, built and away I went. :)

 

I've used LLVM a fair amount for different things.  I'm sure you'll enjoy it, though it's a bit rough to get started given they didn't use standard libraries (at all?) so it's a new background to learn and some new coding styles to figure out.  Beyond that, I love using the infrastructure for a number of useful things.

Share this post


Link to post
Share on other sites
jsvcycling    1222

I agree with AllUpEight. Its not hard to build LLVM (it just takes a while). I usually skip the tests though because they can take a very long time (the first time I did it, it took about 7 hours to complete for both Clang and LLVM). The tests are really only neaded if you are using a trunk build, but I use vanilla 3.2 so I couldn't care less about the tests. Besides, I wanted LLVM/Clang to run Emscripten on, not hack LLVM or Clang.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this