Homebrew LLVM 1.8 VC8 patch (for a quick-fix moderately up-to-date LLVM)

I spent an evening a few days ago getting LLVM 1.8 to build and run properly with VC8, because that’s pretty much my target platform at the moment. (See this thread on LLVMdev.) Some of the things I fixed are already fixed in CVS according to Chris Lattner, but I haven’t submitted any patches for the other fixes yet. I’d like to make that patch the ‘proper’ way and get a machine with VC 7.1 set up so the projects are still VC 7.1 and you can just upgrate to use them in VC8, but I haven’t gotten around to that yet… anyway, if you just want it to build on VC8, download this patch and apply it.

If you have Cygwin, the way I suggest doing this is:

1) Download the LLVM-1.8 source from llvm.org & extract
2) Extract llvm-vc8.diff and move it in the parent directory of the ‘llvm’ directory
3) cd llvm
4) patch -p1 -i ../llvm-vc8.diff
5) Download Flex and Bison from gnuwin32 and add the directory they’re in to VC8′s directories list (I downloaded the zipfiles and extracted them under win32/tools/, so you have win32/tools/bin/bison.exe, etc.)
6) Open win32/llvm.sln and build it (if any errors occur, try building again in case it’s a dependency ordering issue)

Theoretically this is all that you need to build; I haven’t had time to test it from scratch, please send me a comment if it doesn’t work.

4 thoughts on “Homebrew LLVM 1.8 VC8 patch (for a quick-fix moderately up-to-date LLVM)

  1. Good day I am so grateful I found your webpage, I really
    found you by error, while I was looking on Digg for something else,
    Regardless I am here now and would just like to say thanks a lot for a tremendous
    post and a all round interesting blog (I also love the theme/design), I
    don’t have time to browse it all at the minute but I have bookmarked
    it and also added in your RSS feeds, so when I have time I will be back to read much more, Please do keep
    up the superb jo.

  2. Hello, you used to write magnificent, but the last several posts have been kinda
    boring? I miss your super writings. Past several posts
    are just a little bit out of track! come on!

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>