<div dir="ltr">Check out chapuni's unified git tree for the entire SVN repo:<div><br></div><div><a href="https://github.com/chapuni/llvm-project">https://github.com/chapuni/llvm-project</a><br></div><div><br></div><div>
-- Sean Silva</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 4, 2014 at 12:05 PM, Jonas Wagner <span dir="ltr"><<a href="mailto:jonas.wagner@epfl.ch" target="_blank">jonas.wagner@epfl.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>git bisect helped me today in tracking down a regression in LLVM/Clang. Because LLVM/Clang code is split across multiple git repositories, there were a few obstacles to overcome prior to using git bisect. I thought I would share them here, in the hope that they're useful for others.</div>


<div><br></div><div>The main difficulty was to check out the version of clang and compiler-rt that would compile with a given LLVM revision. I used the following code in the bisect script:</div><div><div><br></div><div>    checkout() {</div>


<div>        cd $LLVM_SRC</div><div>        local committer_date="$(git log --pretty=format:%cd -n1 'HEAD')"</div><div>        cd $LLVM_SRC/tools/clang</div><div>        git checkout "$(git rev-list -n 1 --before="$committer_date" origin/google/testing)"</div>


<div>        cd $LLVM_SRC/projects/compiler-rt</div><div>        git checkout "$(git rev-list -n 1 --before="$committer_date" origin/google/testing)"</div><div>    }</div><div><br></div><div>    build() {</div>


<div>        cd $LLVM_BUILD<br></div><div>        ninja<br></div><div>    }</div><div><br></div><div>    # Go for it!</div><div>    checkout  || exit 125</div><div>    build  || exit 125</div><div>    run_test</div></div>


<div><br></div><div>The code will, for a given LLVM revision, checkout the latest revision from the google/testing branch for both clang and compiler-rt. It will then compile everything. If either fails, the script exits with code 125, which tells git bisect to skip the current commit and try another one.</div>


<div><br></div><div>Hope this helps!</div><span class="HOEnZb"><font color="#888888"><div>Jonas</div></font></span></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div>