Skip to content

Instantly share code, notes, and snippets.

@springmeyer
Created July 3, 2014 18:47
Show Gist options
  • Save springmeyer/a276c29f3b72832bcd42 to your computer and use it in GitHub Desktop.
Save springmeyer/a276c29f3b72832bcd42 to your computer and use it in GitHub Desktop.
clang/llvm/iwyu setup
# http://clang-developers.42468.n3.nabble.com/How-to-determine-clang-s-system-include-dirs-to-set-in-ASTVisitor-td4029080.html
: '
https://gist.github.com/springmeyer/4480481
https://gist.github.com/springmeyer/4279264
'
git clone http://llvm.org/git/llvm.git
cd llvm/tools
git clone http://llvm.org/git/clang.git
cd tools
git clone http://llvm.org/git/clang-tools-extra.git
# https://code.google.com/p/include-what-you-use/issues/detail?id=150
: '
cd tools/clang/tools/include-what-you-use/
svn up
wget "https://include-what-you-use.googlecode.com/issues/attachment?aid=1500008000&name=alias_template_fix_idea.patch&token=ABZ6GAecOtZ2gCosJPt7xJaWoJYd_6h8VA%3A1403814359790"
mv attachment\?aid\=1500008000\&name\=alias_template_fix_idea.patch\&token\=ABZ6GAecOtZ2gCosJPt7xJaWoJYd_6h8VA%3A1403814359790 patch.diff
patch -p0 < patch.diff
'
svn co http://include-what-you-use.googlecode.com/svn/trunk/ include-what-you-use
perl -p -i -e 's/diagtool/diagtool include-what-you-use/g' Makefile
cd ../../../
cd ./projects
git clone http://llvm.org/git/compiler-rt.git
cd ../
git config branch.master.rebase true
./configure --prefix=/opt/llvm/ --enable-clang-static-analyzer --enable-optimized
make && make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment