Ericsson / clang

Cross Translation Unit analysis capability for Clang Static Analyzer. (Fork of official clang at http://llvm.org/git/clang)
http://clang.llvm.org/
Other
15 stars 10 forks source link

fix ctu_pipeline_clang7,8 #678

Closed dkrupp closed 5 years ago

dkrupp commented 5 years ago

First get this PR merged https://github.com/Ericsson/codechecker/pull/2030

Here is the status of the ctu-clang8 branch and below are a few TODOs we have to take care in order to be able to release with Clang8 (which includes CTU).

We have a ci job on the ci1 machine which handles both clang7 and clang8 pullrequests: http://ci1.codechecker.gic.ericsson.se:8080/job/ctu_pipeline_pullrequest/ This uses the same scripts which are used in ci2, for the long running ctu jobs: http://ci2.codechecker.gic.ericsson.se:8080/job/ctu_pipeline_clang7/ http://ci2.codechecker.gic.ericsson.se:8080/job/ctu_pipeline_clang8/ The build scripts are located in /local/clang-jenkins/jenkins_home both in ci2 and in ci1 and they are versioned by the git remote https://openalm.lmera.ericsson.se/plugins/git/codechecker/clang_jenkins . The auxiliary files which are used for the jobs are here: /local/clang-jenkins/jenkins_home/ctu_pipeline_aux This dir contains the codecheker from github, csa-testbench and failed zips of Ericsson products. Ci1 and ci2 now has the very same ctu_pipeline_aux dirs, but they are just raw copies of each other, we do not have a shared storage which we could use both in ci1 and ci2 (do we?).

Currently the jobs are running well only with the ctu-clang8 branch, because Endre's change is breaking clang7 at the moment: [ERROR] usage: CodeChecker [-h] {analyze} ... CodeChecker: error: unrecognized arguments: --ctu Currently we use Endre's patch rebased on a quite recent codechecker. [TODO] Once this PR (https://github.com/Ericsson/codechecker/pull/2030) is merged (so both clang7 and clang8 passes), please fetch the remote and use the latest master of codechecker in the ci jobs. Do this on both ci1 and ci2, or just on ci1 and then copy to ci2. You may have permission problems, because some of the dirs have been created by my (egbomrt) user. Then use sudo and chown -R to clang-jenkins or something similar.

[TODO] ctu-clang8 on ci2 fails because: /var/jenkins_home/workspace/ctu_pipeline_clang8/clangsa_checkers/plugin/include/Checkers.td:5:27: error: Couldn't find class 'InPackage' def Cpp : Package<"cpp">, InPackage; Husi has the idea to use ParentPackage instead of InPackage.

[TODO] There are crashes which are Clang8 and CTU specific with the more complex C++ projects (bitcoin, protobuf). https://github.com/Ericsson/clang/issues/676