Build LLVM from source

Started by
3 comments, last by jsvcycling 11 years ago

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?

Advertisement

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.

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

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.

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.

Some favourite quotes:Never trust a computer you can't throw out a window.
- Steve Wozniak

The best way to prepare [to be a programmer] is to write programs, and to study great programs that other people have written.
- Bill Gates

There's always one more bug.
- Lubarsky's Law of Cybernetic Entomology

Think? Why think! We have computers to do that for us.
- Jean Rostand

Treat your password like your toothbrush. Don't let anybody else use it, and get a new one every six months.
- Clifford Stoll

To err is human - and to blame it on a computer is even more so.
- Robert Orben

Computing is not about computers any more. It is about living.
- Nicholas Negroponte

This topic is closed to new replies.

Advertisement