[LLVMdev] Using git bisect with LLVM
NAKAMURA Takumi
geek4civic at gmail.com
Fri Jul 4 16:00:03 PDT 2014
FYI, I have submodularized one.
https://github.com/chapuni/llvm-project-submodule
It'd be useful just to bisect.
2014-07-05 5:03 GMT+09:00 Alp Toker <alp at nuanti.com>:
> We're using a very similar script to the one posted to the list FWIW.
>
> Separate git repositories work with git-svn dcommit and have compatible
> commit IDs with the official git mirror, which isn't the case with
> all-in-one repositories, so it's definitely a worthwhile approach.
>
> (Now, if we could do this with git submodules instead of git subtrees, that
> *would* be cool but I don't think the support is there.)
>
> Thanks for sharing Jonas
>
> Alp.
>
>
>
>
> On 04/07/2014 22:49, Sean Silva wrote:
>>
>> Check out chapuni's unified git tree for the entire SVN repo:
>>
>> https://github.com/chapuni/llvm-project
>>
>> -- Sean Silva
>>
>>
>> On Fri, Jul 4, 2014 at 12:05 PM, Jonas Wagner <jonas.wagner at epfl.ch
>> <mailto:jonas.wagner at epfl.ch>> wrote:
>>
>> Hello,
>>
>> 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.
>>
>> 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:
>>
>> checkout() {
>> cd $LLVM_SRC
>> local committer_date="$(git log --pretty=format:%cd -n1
>> 'HEAD')"
>> cd $LLVM_SRC/tools/clang
>> git checkout "$(git rev-list -n 1
>> --before="$committer_date" origin/google/testing)"
>> cd $LLVM_SRC/projects/compiler-rt
>> git checkout "$(git rev-list -n 1
>> --before="$committer_date" origin/google/testing)"
>> }
>>
>> build() {
>> cd $LLVM_BUILD
>> ninja
>> }
>>
>> # Go for it!
>> checkout || exit 125
>> build || exit 125
>> run_test
>>
>> 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.
>>
>> Hope this helps!
>> Jonas
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu>
>>
>> http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>>
>>
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
> --
> http://www.nuanti.com
> the browser experts
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list