How We Manage Vendor Branches
Any third-party code that we'll want to ship with ROOT should be tracked with a vendor branch under 'vendors/'. This document describes how to create and update these vendor branches.
Updating LLVM and Clang
LLVM is stored under 'vendors/llvm', Clang is under 'vendors/clang'. This assumes you have a revision you'd like to update to, called '$GOLDEN' in these examples. This also assumes that you've tested both LLVM and Clang using their 'make check' and 'make test' commands. Instructions for building and testing LLVM and Clang can be found in Clang's Get Started guide.
# Export LLVM at the desired revision. svn export -r $GOLDEN http://llvm.org/svn/llvm-project/llvm/trunk llvm-export # Export Clang at the desired revision svn export -r $GOLDEN http://llvm.org/svn/llvm-project/cfe/trunk clang-export # Using the svn_load_dirs.pl script in 'build/unix/', push the LLVM and Clang # updates to the ROOT svn. This will run 'svn commit' automatically. $ROOTSYS/build/unix/svn_load_dirs.pl https://root.cern.ch/svn/root/vendors llvm llvm-export -m "Update LLVM to r$GOLDEN." $ROOTSYS/build/unix/svn_load_dirs.pl https://root.cern.ch/svn/root/vendors clang clang-export -m "Update Clang to r$GOLDEN." # Both of the 'svn_load_dirs.pl' steps should have given you a final revision number # for their checkins. We need to merge those changes into 'trunk/'. cd $ROOTSYS/interpreter/llvm/src svn merge -c $LLVM_REV https://root.cern.ch/svn/root/vendors/llvm . cd $ROOTSYS/interpreter/llvm/src/tools/clang svn merge -c $CLANG_REV https://root.cern.ch/svn/root/vendors/clang . # now apply the patches from 'interpreter/cling/patches' # and run 'make all-llvm' in '$ROOTSYS' and next 'make test' from # 'interpreter/llvm/obj' before committing the merger.
Example revisions:
- r530: update LLVM vendor branch.
- r531: update Clang vendor branch.
- r532: merge both updates to trunk.
These steps are coded in the script updatellvm.sh in 'build/unix/'.