running clang compiler test suite from within macports infrastructure?

Jack Howarth howarth.at.macports at gmail.com
Fri Jun 30 01:38:17 UTC 2017


Ken,
     Note that you have to explicitly configure the cmake build to compile
the test suite by passing...

-DLIBCXX_INCLUDE_TESTS=ON


(if you want to test the matching libcxx anyway). Also in fink, we also
pass -DLLVM_CONFIG_PATH=%b/../build/last/bin/llvm-config to
LIBCXX_CMAKE_OPTIONS placeholder in our shell scripts. If you look at the
files at...


https://sourceforge.net/p/fink/package-submissions/4933/


you will see the current state of our 3-stage bootstrap with stage2/stage3
file comparison. The general process that we use is...


1) build stage1 against the system libcxx and clang compiler

2) build stage1.5 libcxx with the stage1 compiler

3) build the stage2 compiler with the stage1 compiler against the stage1.5
libcxx

4) build the stage2.5 libcxx with the stage2 compiler

5) build the stage3 compiler against the stage2 compiler with the stage2.5
libcxx

6) perform an exhaustive stage2/stage3 object file comparison to detect any
non-determinism that has crept in to the compiler.


While a bit difficult to follow and maintain, I really like this build
approach as upstream llvm.org seems to be rather lax about doing proper
3-stage bootstraps with stage2/stage3 file comparison ala FSF gcc.


I've run into a couple of instances where upstream trunk had gone
non-deterministic and the majority of the llvm developers were completely
oblivious to it due to the absence of proper bootstrap testing on the
buildbots.

           Jack

On Thu, Jun 29, 2017 at 8:33 PM, Ken Cunningham <
ken.cunningham.webuse at gmail.com> wrote:

> I suspect only Jeremy or LarryV could answer this, but is it possible to
> run the llvm / clang compiler test suite from within the macports
> infrastructure?
>
> The clang build on macports is very heavily modified with patches and
> configuration settings - it seems overwhelming to try to duplicate that as
> a separate download in the usual way this might have been imagined.
>
> I can turn the llvm & clang tests on with the portfile configure switches
> easily enough -- and build the port without destrooting or installing it, I
> guess, to leave everything in place -- but then I suspect I'd be poking
> around for days trying to figure out how to make this work reliably.
>
> Given how many years clang / llvm has been part of macports, I suspect
> this has been sorted out -- has anyone already already been through this
> exercise?
>
> I have clang-3.8 running really quite reliably on ppc now - only
> exceptions are not working, and not many ports use exceptions. But I'd feel
> much better if I could run the test suite and see where we really are with
> it.
>
> Ken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20170629/3fb348f4/attachment.html>


More information about the macports-dev mailing list