[cfe-dev] Compiling and running clangs unit tests

Nikola Smiljanic popizdeh at gmail.com
Sun Jul 26 15:36:52 PDT 2015


   1. -- Found LLVM_CONFIG as
   /home/milian/projects/compiled/other/bin/llvm-config


This makes me believe your clang build is not using the llvm you just
built? Do you have installed version of LLVM on your distro?

I used to build Clang out of source on Windows and you had to provide path
to LLVM but I can't see that in CMake gui anymore (on Linux). The only
thing I can suggest is to move clang inside llvm/tools and build in-tree.
That will work 100%

On Mon, Jul 27, 2015 at 8:29 AM, Milian Wolff <mail at milianw.de> wrote:

> On Monday, July 27, 2015 08:25:37 AM Nikola Smiljanic wrote:
> > How did you configure? I'm a bit surprised by bulid/clang path. It looks
> > like you're building Clang but not LLVM?
>
> Yes, I'm building Clang.
>
> I have:
>
> ~/projects/src/llvm
> ~/projects/src/clang
> ~/projects/build/llvm
> ~/projects/build/clang
>
> The former two are checkouts of the release_37 branches of the
> corresponding
> git at github.com:llvm-mirror/*.git repositories. I configured them basically
> with
>
> build/llvm$ cmake ../../src/llvm -DCMAKE_BUILD_TYPE=RelWithDebInfo -
> DCMAKE_INSTALL_TYPE=$HOME/projects/compiled/llvm
>
> and then same for clang. Everything compiles and works just fine, except
> for
> the unit tests. And those are only compiled for me when I run `make clang-
> test` manually, i.e. they are not included in the "normal" make call - is
> this
> intended?
>
> Or does clang not support out of source builds?
>
> > On Sun, Jul 26, 2015 at 10:27 PM, Milian Wolff <mail at milianw.de> wrote:
> > > Hey all,
> > >
> > > in preparation of working on clang, I want to compile and run the unit
> > > tests,
> > > specifically those for the clang-c part.
> > >
> > > I read http://clang.llvm.org/hacking.html and tried to run `make
> > > clang-test`
> > > in my external build folder, but that fails at link time:
> > >
> > > https://paste.kde.org/ptylyjsa7
> > >
> > > This is using the latest versions of the release_37 branches in both,
> LLVM
> > > and
> > > clang. Could someone tell me what's going wrong here?
>
> --
> Milian Wolff
> mail at milianw.de
> http://milianw.de
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150727/73afd318/attachment.html>


More information about the cfe-dev mailing list