[cfe-users] Confusion about building llvm/clang

Dmitri Gribenko gribozavr at gmail.com
Sat Jan 5 06:52:44 PST 2013


On Sat, Jan 5, 2013 at 7:01 AM, Edward Diener
<eldlistmailingz at tropicsoft.com> wrote:
> In the instructions at http://clang.llvm.org/get_started.html it says that
> after the initial run of 'llvm/configure' and 'make' I can subsequentally
> build clang from the clang directory level. This makes sense, but does this
> work after I update both llvm and clang ?
>
> Later on, however, the instructions say:
>
> "Once you have checked out Clang into the llvm source tree it will build
> along with the rest of llvm. To build all of LLVM and Clang together all at
> once simply run make from the root LLVM directory."
>
> This is confusing. I thought running 'make' from the clang directory level
> will build all of llvm and clang since clang depends on llvm. What am I
> missing here ?

Running make from tools/clang will only rebuild clang, even if some
files in llvm/ were changed and need to be rebuilt.  This can lead to
an inconsistent build and weird errors.  To be safe, to update the
working copy one should 'svn up' both repositories and run make in the
root build directory.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-users mailing list