installation of scripts

Hi,

I'd like to know why some scripts like 'run-clang-tidy.py' get installed
into a separate folder (/usr/local/share/clang instead of /usr/local/bin on
OSX) and why the scan-build Python package, including intercept-build and
analyze-build, is not part of the installation at all. Is there an option
to choose the Python scan-build version?

-Alex

+ Laszlo

The scan-build-py script is currently under development. The main remaining pieces are:

(1) Build the library interposition shared libraries as part of the normal clang build process with CMake. This will make sure the library is built with the same compiler that builds clang.
(2) Integrate scan-build-py's unit and functional tests into clang’s lit-based test suite so they can be run on the bots. Without this we can't qualify scan-build-py as part of clang 4.x releases.
(3) Dogfood and fix bugs if any.
(4) Actually add the script installation code.

Are you using the script?

Thanks!
Anna.

Ah, I thought it had been completed when
https://reviews.llvm.org/D9600 was committed.
Thanks for giving an overview about the state.
I've been using the scripts since the commit
on a dozen of projects and didn't experience any
problems.

But I would like to point out one thing:
Using 'intercept-build' and then 'analyze-build'
seems to act a little different than only using
'scan-build' when it comes to wrapper compilers.
'intercept-build + analyze-build' works in case of
using an MPI wrapper compiler, whereas 'scan-build'
never emits any reports.

(1) The shared library is made of a single file, right (ear.c)?

(2) Regarding the tests, the compilation databases
sometimes denote 'g++' as the used compiler.

This seems suspicious. Shouldn't this be 'cc'?

Cheers,
Alex

hi Alex,

thanks for your feedback. about your point on MPI wrapper compiler, can you hint me a project which needs that (and has a little intro for beginners how to compile/install)? would like to experiment this anomaly and fix the problem.

(1) yes

(2) compiler can be anything in a compilation database. this particular file is used in tests are consumed by analyze-build. wanted to pin down that it also works with any compiler name. (can’t write comment in JSON files, sorry)

regards,

Laszlo

Hi Laszlo,

thanks for working on this.

Sure, one of the example projects for the MPI-Checker should serve
as a minimal example:

MPICH and Open MPI are common MPI implementations.
They should be available through brew/apt-get/dnf/etc.

(2) I see, I thought this enforces the user to have the g++ bin available.

-Alex