Skip to content

Instantly share code, notes, and snippets.

@macton macton/mingw-clang-build
Last active Sep 20, 2018

Embed
What would you like to do?
Installation steps for getting a functional Clang++ build running on Windows 8 and MinGW.
See:
- http://www.bencode.net/blog/2012/10/20/clangonwindows/
- http://sourceforge.net/p/mingw/bugs/2043/
Steps:
1. Assumes mingw and gcc installed.
a. http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/
b. Add c:\mingw\bin to PATH
c. Note: gcc --version is "gcc.exe (GCC) 4.8.1"
2. Install python 2.7.9
a. http://sourceforge.net/p/mingw/bugs/2043/
b. Install dir: c:\MinGW\bin
3. Install Subversion 1.8.11
a. http://www.collab.net/downloads/subversion
4. mkdir /src
a. Note: maps to c:\mingw\msys\1.0\src
5. cd /src
6. svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
7. cd llvm/tools
8. svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
9. cd ../projects
10. svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
11. cd ../..
12. mkdir build
13. cd build
14. ../llvm/configure --disable-docs --enable-optimized --enable-targets=x86,x86_64 --prefix=/mingw
15. make CXXFLAGS="-D_GLIBCXX_HAVE_FENV_H -DKEY_WOW64_32KEY=0x0200"
16. make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.